chore(ci): reflect the change of master to main in job declarations/scripts

[no changelog]
grdddj/master_to_main_changes
grdddj 7 months ago
parent 7f86858709
commit 67a3e80a2c

@ -352,7 +352,7 @@ core unix frozen debug build arm:
<<: *gitlab_caching <<: *gitlab_caching
needs: [] needs: []
only: only:
- master - main
- tags - tags
- /^release\// - /^release\//
- /^secfix\// - /^secfix\//
@ -535,7 +535,7 @@ legacy emu regular debug build arm:
<<: *gitlab_caching <<: *gitlab_caching
needs: [] needs: []
only: only:
- master - main
- tags - tags
- /^release\// - /^release\//
- /^secfix\// - /^secfix\//

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
base_branch=master base_branch=main
fail=0 fail=0
subdirs="core core/embed/boardloader core/embed/bootloader core/embed/bootloader_ci legacy/bootloader legacy/firmware legacy/intermediate_fw python" subdirs="core core/embed/boardloader core/embed/bootloader core/embed/bootloader_ci legacy/bootloader legacy/firmware legacy/intermediate_fw python"

@ -2,21 +2,21 @@
fail=0 fail=0
git fetch origin master git fetch origin main
# list all commits between HEAD and master # list all commits between HEAD and main
for commit in $(git rev-list origin/master..) for commit in $(git rev-list origin/main..)
do do
message=$(git log -n1 --format=%B $commit) message=$(git log -n1 --format=%B $commit)
echo "Checking $commit" echo "Checking $commit"
# The commit message must contain either # The commit message must contain either
# 1. "cherry-picked from [some commit in master]" # 1. "cherry-picked from [some commit in main]"
if [[ $message =~ "(cherry picked from commit" ]]; then if [[ $message =~ "(cherry picked from commit" ]]; then
# remove last ")" and extract commit hash # remove last ")" and extract commit hash
master_commit=$(echo ${message:0:-1} | tr ' ' '\n' | tail -1) main_commit=$(echo ${message:0:-1} | tr ' ' '\n' | tail -1)
# check if master really contains this commit hash # check if main really contains this commit hash
if [[ $(git branch -a --contains $master_commit | grep --only-matching "remotes/origin/master") == "remotes/origin/master" ]]; then if [[ $(git branch -a --contains $main_commit | grep --only-matching "remotes/origin/main") == "remotes/origin/main" ]]; then
continue continue
fi fi
fi fi

@ -33,7 +33,7 @@ core unix coverage posttest:
unix ui changes: unix ui changes:
stage: posttest stage: posttest
except: except:
- master - main
<<: *gitlab_caching <<: *gitlab_caching
needs: needs:
- core click test - core click test

@ -47,7 +47,7 @@ release commit messages prebuild:
stage: prebuild stage: prebuild
before_script: [] # nothing needed before_script: [] # nothing needed
variables: variables:
# We need to clone the repo properly so we can work with origin/master. # We need to clone the repo properly so we can work with origin/main.
GIT_STRATEGY: clone GIT_STRATEGY: clone
only: only:
refs: refs:
@ -63,7 +63,7 @@ release commit messages prebuild:
changelog prebuild: changelog prebuild:
stage: prebuild stage: prebuild
except: except:
- master - main
before_script: [] # nothing needed before_script: [] # nothing needed
variables: variables:
GIT_SUBMODULE_STRATEGY: "none" GIT_SUBMODULE_STRATEGY: "none"

Loading…
Cancel
Save