mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
chore: update branch name to main where its used
This commit is contained in:
parent
7f86858709
commit
fd7b9a3dde
@ -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"
|
||||||
|
@ -26,7 +26,7 @@ GITSUBREPO_TEMPLATE = """\
|
|||||||
;
|
;
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = git+ssh://git@github.com/trezor/{remote}
|
remote = git+ssh://git@github.com/trezor/{remote}
|
||||||
branch = master
|
branch = main
|
||||||
commit = {remote_head}
|
commit = {remote_head}
|
||||||
parent = {current_head}
|
parent = {current_head}
|
||||||
method = rebase
|
method = rebase
|
||||||
@ -45,22 +45,22 @@ def git(args):
|
|||||||
|
|
||||||
def move_to_subtree(remote, dst):
|
def move_to_subtree(remote, dst):
|
||||||
os.makedirs(dst, exist_ok=True)
|
os.makedirs(dst, exist_ok=True)
|
||||||
for fn in lines(git(f"ls-tree --name-only remotes/{remote}/master")):
|
for fn in lines(git(f"ls-tree --name-only remotes/{remote}/main")):
|
||||||
if fn == ".gitmodules":
|
if fn == ".gitmodules":
|
||||||
continue
|
continue
|
||||||
git(f"mv {fn} {dst}/{fn}")
|
git(f"mv {fn} {dst}/{fn}")
|
||||||
|
|
||||||
|
|
||||||
def rewrite_gitmodules(remote, dst):
|
def rewrite_gitmodules(remote, dst):
|
||||||
master_gitmodules = git("show master:.gitmodules")
|
main_gitmodules = git("show main:.gitmodules")
|
||||||
try:
|
try:
|
||||||
gitmodules = git(f"show {remote}/master:.gitmodules")
|
gitmodules = git(f"show {remote}/main:.gitmodules")
|
||||||
except:
|
except:
|
||||||
# no gitmodules
|
# no gitmodules
|
||||||
return
|
return
|
||||||
gitmodules = gitmodules.replace('submodule "', f'submodule "{dst}/')
|
gitmodules = gitmodules.replace('submodule "', f'submodule "{dst}/')
|
||||||
with open(".gitmodules", "w") as f:
|
with open(".gitmodules", "w") as f:
|
||||||
f.write(master_gitmodules + gitmodules)
|
f.write(main_gitmodules + gitmodules)
|
||||||
git("add .gitmodules")
|
git("add .gitmodules")
|
||||||
|
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ def merge_remote(remote, dst):
|
|||||||
git(f"remote add {remote} {TREZOR_REPO}/{remote}")
|
git(f"remote add {remote} {TREZOR_REPO}/{remote}")
|
||||||
git(f"fetch {remote}")
|
git(f"fetch {remote}")
|
||||||
try:
|
try:
|
||||||
git(f"merge --no-commit --allow-unrelated-histories {remote}/master")
|
git(f"merge --no-commit --allow-unrelated-histories {remote}/main")
|
||||||
except:
|
except:
|
||||||
# this might fail because of .gitmodules conflict
|
# this might fail because of .gitmodules conflict
|
||||||
pass
|
pass
|
||||||
@ -86,8 +86,8 @@ def retag_remote(remote, dst):
|
|||||||
|
|
||||||
|
|
||||||
def generate_subrepo_file(remote):
|
def generate_subrepo_file(remote):
|
||||||
current_head = git("rev-parse master").strip()
|
current_head = git("rev-parse main").strip()
|
||||||
remote_head = git(f"rev-parse {remote}/master").strip()
|
remote_head = git(f"rev-parse {remote}/main").strip()
|
||||||
dst = SUBREPOS[remote]
|
dst = SUBREPOS[remote]
|
||||||
with open(f"{dst}/.gitrepo", "w") as f:
|
with open(f"{dst}/.gitrepo", "w") as f:
|
||||||
f.write(GITSUBREPO_TEMPLATE.format(remote=remote, current_head=current_head, remote_head=remote_head))
|
f.write(GITSUBREPO_TEMPLATE.format(remote=remote, current_head=current_head, remote_head=remote_head))
|
||||||
@ -106,7 +106,7 @@ def main():
|
|||||||
|
|
||||||
if remote in PUBLISHED_SUBREPOS:
|
if remote in PUBLISHED_SUBREPOS:
|
||||||
with open(f"{dst}/.gitmodules", "w") as f:
|
with open(f"{dst}/.gitmodules", "w") as f:
|
||||||
f.write(git(f"show {remote}/master:.gitmodules"))
|
f.write(git(f"show {remote}/main:.gitmodules"))
|
||||||
git(f"add {dst}/.gitmodules")
|
git(f"add {dst}/.gitmodules")
|
||||||
|
|
||||||
git(f"commit -m 'MONOREPO MERGE {remote}'")
|
git(f"commit -m 'MONOREPO MERGE {remote}'")
|
||||||
|
@ -47,8 +47,8 @@ means that **our team will not be accepting any requests to add new
|
|||||||
cryptocurrencies.**
|
cryptocurrencies.**
|
||||||
|
|
||||||
[trezor-firmware]: https://github.com/trezor/trezor-firmware
|
[trezor-firmware]: https://github.com/trezor/trezor-firmware
|
||||||
[common/defs/bitcoin]: https://github.com/trezor/trezor-firmware/tree/master/common/defs/bitcoin
|
[common/defs/bitcoin]: https://github.com/trezor/trezor-firmware/tree/main/common/defs/bitcoin
|
||||||
[ethereum-lists/chains]: https://github.com/ethereum-lists/chains
|
[ethereum-lists/chains]: https://github.com/ethereum-lists/chains
|
||||||
[ethereum-lists/tokens]: https://github.com/ethereum-lists/tokens
|
[ethereum-lists/tokens]: https://github.com/ethereum-lists/tokens
|
||||||
[common/defs/nem/nem_mosaics.json]: https://github.com/trezor/trezor-firmware/tree/master/common/defs/nem/nem_mosaics.json
|
[common/defs/nem/nem_mosaics.json]: https://github.com/trezor/trezor-firmware/tree/main/common/defs/nem/nem_mosaics.json
|
||||||
[common/defs/misc/misc.json]: https://github.com/trezor/trezor-firmware/tree/master/common/defs/misc/misc.json
|
[common/defs/misc/misc.json]: https://github.com/trezor/trezor-firmware/tree/main/common/defs/misc/misc.json
|
||||||
|
Loading…
Reference in New Issue
Block a user