diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 98aa3197d..416e2f436 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -33,7 +33,7 @@ To run all tests of all services, execute `run-service-tests`. TODO: Systemtests $ git submodule add -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 current commit: @@ -45,7 +45,7 @@ Then, commit changes and create a pull request. 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 $ git remote remove origin @@ -55,7 +55,7 @@ Add your fork and the main repo as origin and upstream $ git remote add origin `` $ git remote add upstream `
` $ git fetch --all - $ git checkout origin master + $ git checkout origin main 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 -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 - $ git status # -> on master? + $ git status # -> on main? $ git checkout -b my-feature 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: $ cd my-service - $ git pull upstream master + $ git pull upstream main $ cd .. $ 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 push origin updated-my-service -Or a direct push on master: +Or a direct push on main: $ git commit -am "Updated my-service" - $ git push origin master + $ git push origin main ## Working with Submodules After working in many services with different branches, this command checks -out `master` (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 +out `main` (or the given branch in the .gitmodules) in all submodules and +pulls main from upstream (This requres to have `upstream`set up as a remote 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: - $ make services-to-master + $ make services-to-main 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 diff --git a/Makefile b/Makefile index 6a90df9ef..633543c69 100644 --- a/Makefile +++ b/Makefile @@ -27,8 +27,8 @@ copy-node-modules: reload-proxy: docker-compose -f docker/docker-compose.dev.yml exec -w /etc/caddy proxy caddy reload -services-to-master: - ./services-to-master.sh +services-to-main: + ./services-to-main.sh submodules-origin-to-upstream: # You may only use this one time after cloning this repository. diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 1a64fe4f9..788ff7375 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -26,7 +26,7 @@ services: environment: - DATASTORE_ENABLE_DEV_ENVIRONMENT=1 - 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 ports: - 9011:9011 diff --git a/proxy/Dockerfile b/proxy/Dockerfile index e2b5fee62..461a141cc 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -3,7 +3,7 @@ FROM caddy:2.3.0-alpine 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.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 diff --git a/services-to-master.sh b/services-to-main.sh similarity index 89% rename from services-to-master.sh rename to services-to-main.sh index 9eed05c38..7ea4945d4 100755 --- a/services-to-master.sh +++ b/services-to-main.sh @@ -3,8 +3,7 @@ function get_upstream_branch { local SUBMODULE_NAME=$0 local MEDIA_SERVICE_NAME="openslides-media-service" - # We have to treat the media-service differently to the other services - # until its "main" branch is neither master nor main + # We have to treat the media-service differently to the other services if [ "$SUBMODULE_NAME" == "$MEDIA_SERVICE_NAME" ]; then echo "openslides4-dev" return @@ -23,7 +22,7 @@ function get_upstream_name { echo "origin" return } - echo "upstream" + echo "upstream" } 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: # 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 checkout $(git config -f $$toplevel/.gitmodules submodule.$$name.branch || echo main); +# git pull upstream $$(git config -f $$toplevel/.gitmodules submodule.$$name.branch || echo main) # ' \ No newline at end of file