Set various information to "main" (#6325)
Changes various usages from master to main
This commit is contained in:
parent
fa0fa370d6
commit
88dad9fc3e
@ -33,7 +33,7 @@ To run all tests of all services, execute `run-service-tests`. TODO: Systemtests
|
|||||||
|
|
||||||
$ git submodule add <git@myrepo.git>
|
$ git submodule add <git@myrepo.git>
|
||||||
|
|
||||||
Append `branch = master` (or `main`) to the new entry in the `.gitmodules` file. Verify,
|
Append `branch = main` to the new entry in the `.gitmodules` file. Verify,
|
||||||
that it is there (the folder should have 160000 permissions: Submodule) with the
|
that it is there (the folder should have 160000 permissions: Submodule) with the
|
||||||
current commit:
|
current commit:
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ Then, commit changes and create a pull request.
|
|||||||
|
|
||||||
Create your own fork at github.
|
Create your own fork at github.
|
||||||
|
|
||||||
Remove the upstream (master or main) repo as the origin in the submodule:
|
Remove the upstream repo as the origin in the submodule:
|
||||||
|
|
||||||
$ cd <submodule>
|
$ cd <submodule>
|
||||||
$ git remote remove origin
|
$ git remote remove origin
|
||||||
@ -55,7 +55,7 @@ Add your fork and the main repo as origin and upstream
|
|||||||
$ git remote add origin `<your fork>`
|
$ git remote add origin `<your fork>`
|
||||||
$ git remote add upstream `<main repo>`
|
$ git remote add upstream `<main repo>`
|
||||||
$ git fetch --all
|
$ git fetch --all
|
||||||
$ git checkout origin master
|
$ git checkout origin main
|
||||||
|
|
||||||
You can verify that your setup is correct using
|
You can verify that your setup is correct using
|
||||||
|
|
||||||
@ -101,10 +101,10 @@ Note that meaningful defaults should be provided in the Dockerfile.
|
|||||||
|
|
||||||
## Developing on a single service
|
## Developing on a single service
|
||||||
|
|
||||||
Go to the serivce and create a new branch (from master):
|
Go to the serivce and create a new branch (from main):
|
||||||
|
|
||||||
$ cd my-service
|
$ cd my-service
|
||||||
$ git status # -> on master?
|
$ git status # -> on main?
|
||||||
$ git checkout -b my-feature
|
$ git checkout -b my-feature
|
||||||
|
|
||||||
Run OpenSlides in development mode (e.g. in a new terminal):
|
Run OpenSlides in development mode (e.g. in a new terminal):
|
||||||
@ -121,7 +121,7 @@ As the last step, you can create a PR on Github. After merging, these steps are
|
|||||||
required to be executed in the main repo:
|
required to be executed in the main repo:
|
||||||
|
|
||||||
$ cd my-service
|
$ cd my-service
|
||||||
$ git pull upstream master
|
$ git pull upstream main
|
||||||
$ cd ..
|
$ cd ..
|
||||||
$ git diff # -> commit hash changed for my-service
|
$ git diff # -> commit hash changed for my-service
|
||||||
|
|
||||||
@ -131,23 +131,23 @@ If the update commit should be a PR:
|
|||||||
$ git commit -am "Updated my-service"
|
$ git commit -am "Updated my-service"
|
||||||
$ git push origin updated-my-service
|
$ git push origin updated-my-service
|
||||||
|
|
||||||
Or a direct push on master:
|
Or a direct push on main:
|
||||||
|
|
||||||
$ git commit -am "Updated my-service"
|
$ git commit -am "Updated my-service"
|
||||||
$ git push origin master
|
$ git push origin main
|
||||||
|
|
||||||
## Working with Submodules
|
## Working with Submodules
|
||||||
|
|
||||||
After working in many services with different branches, this command checks
|
After working in many services with different branches, this command checks
|
||||||
out `master` (or the given branch in the .gitmodules) in all submodules and
|
out `main` (or the given branch in the .gitmodules) in all submodules and
|
||||||
pulls master from upstream (This requres to have `upstream`set up as a remote
|
pulls main from upstream (This requres to have `upstream`set up as a remote
|
||||||
in all submodules):
|
in all submodules):
|
||||||
|
|
||||||
$ git submodule foreach -q --recursive 'git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master); git pull upstream $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)'
|
$ git submodule foreach -q --recursive 'git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo main); git pull upstream $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo main)'
|
||||||
|
|
||||||
This command has can also be called from the makefile using:
|
This command has can also be called from the makefile using:
|
||||||
|
|
||||||
$ make services-to-master
|
$ make services-to-main
|
||||||
|
|
||||||
When changing the branch in the main repo (this one), the submodules do not
|
When changing the branch in the main repo (this one), the submodules do not
|
||||||
automatically gets changed. THis ocmmand checks out all submodules to the given
|
automatically gets changed. THis ocmmand checks out all submodules to the given
|
||||||
|
4
Makefile
4
Makefile
@ -27,8 +27,8 @@ copy-node-modules:
|
|||||||
reload-proxy:
|
reload-proxy:
|
||||||
docker-compose -f docker/docker-compose.dev.yml exec -w /etc/caddy proxy caddy reload
|
docker-compose -f docker/docker-compose.dev.yml exec -w /etc/caddy proxy caddy reload
|
||||||
|
|
||||||
services-to-master:
|
services-to-main:
|
||||||
./services-to-master.sh
|
./services-to-main.sh
|
||||||
|
|
||||||
submodules-origin-to-upstream:
|
submodules-origin-to-upstream:
|
||||||
# You may only use this one time after cloning this repository.
|
# You may only use this one time after cloning this repository.
|
||||||
|
@ -26,7 +26,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATASTORE_ENABLE_DEV_ENVIRONMENT=1
|
- DATASTORE_ENABLE_DEV_ENVIRONMENT=1
|
||||||
- COMMAND=create_initial_data
|
- COMMAND=create_initial_data
|
||||||
- DATASTORE_INITIAL_DATA_FILE=https://raw.githubusercontent.com/OpenSlides/openslides-backend/master/global/data/example-data.json
|
- DATASTORE_INITIAL_DATA_FILE=https://raw.githubusercontent.com/OpenSlides/openslides-backend/main/global/data/example-data.json
|
||||||
- OPENSLIDES_DEVELOPMENT=1
|
- OPENSLIDES_DEVELOPMENT=1
|
||||||
ports:
|
ports:
|
||||||
- 9011:9011
|
- 9011:9011
|
||||||
|
@ -3,7 +3,7 @@ FROM caddy:2.3.0-alpine
|
|||||||
LABEL org.opencontainers.image.title="OpenSlides Proxy"
|
LABEL org.opencontainers.image.title="OpenSlides Proxy"
|
||||||
LABEL org.opencontainers.image.description="The proxy is the entrypoint for traffic going into an OpenSlides instance."
|
LABEL org.opencontainers.image.description="The proxy is the entrypoint for traffic going into an OpenSlides instance."
|
||||||
LABEL org.opencontainers.image.licenses="MIT"
|
LABEL org.opencontainers.image.licenses="MIT"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/OpenSlides/OpenSlides/tree/master/proxy"
|
LABEL org.opencontainers.image.source="https://github.com/OpenSlides/OpenSlides/tree/main/proxy"
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache jq gettext
|
RUN apk update && apk add --no-cache jq gettext
|
||||||
|
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
function get_upstream_branch {
|
function get_upstream_branch {
|
||||||
local SUBMODULE_NAME=$0
|
local SUBMODULE_NAME=$0
|
||||||
local MEDIA_SERVICE_NAME="openslides-media-service"
|
local MEDIA_SERVICE_NAME="openslides-media-service"
|
||||||
# We have to treat the media-service differently to the other services
|
# We have to treat the media-service differently to the other services
|
||||||
# until its "main" branch is neither master nor main
|
|
||||||
if [ "$SUBMODULE_NAME" == "$MEDIA_SERVICE_NAME" ]; then
|
if [ "$SUBMODULE_NAME" == "$MEDIA_SERVICE_NAME" ]; then
|
||||||
echo "openslides4-dev"
|
echo "openslides4-dev"
|
||||||
return
|
return
|
||||||
@ -23,7 +22,7 @@ function get_upstream_name {
|
|||||||
echo "origin"
|
echo "origin"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
echo "upstream"
|
echo "upstream"
|
||||||
}
|
}
|
||||||
|
|
||||||
function pull_latest_commit {
|
function pull_latest_commit {
|
||||||
@ -51,6 +50,6 @@ echo "Successfully updated all submodules to latest commit."
|
|||||||
# Old command, if we need to checkout another branch than master or main:
|
# Old command, if we need to checkout another branch than master or main:
|
||||||
# git submodule foreach -q --recursive
|
# git submodule foreach -q --recursive
|
||||||
# '
|
# '
|
||||||
# git checkout $(git config -f $$toplevel/.gitmodules submodule.$$name.branch || echo master);
|
# git checkout $(git config -f $$toplevel/.gitmodules submodule.$$name.branch || echo main);
|
||||||
# git pull upstream $$(git config -f $$toplevel/.gitmodules submodule.$$name.branch || echo master)
|
# git pull upstream $$(git config -f $$toplevel/.gitmodules submodule.$$name.branch || echo main)
|
||||||
# '
|
# '
|
Loading…
Reference in New Issue
Block a user