Set various information to "main" (#6325)

Changes various usages from master to main
This commit is contained in:
Sean 2022-01-10 17:46:40 +01:00 committed by GitHub
parent fa0fa370d6
commit 88dad9fc3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 21 deletions

View File

@ -33,7 +33,7 @@ To run all tests of all services, execute `run-service-tests`. TODO: Systemtests
$ 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
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 <submodule>
$ 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 upstream `<main repo>`
$ 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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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)
# '