ma1 pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
-
15ee5d47
by hackademix at 2025-02-26T19:31:28+01:00
2 changed files:
Changes:
... | ... | @@ -37,11 +37,11 @@ This script gpg signs a git tag associated with a particular browser commit in t |
37 | 37 | |
38 | 38 | #### Prerequisites
|
39 | 39 | |
40 | -- The user must create the following soft-links:
|
|
40 | +- The user may create the following soft-links (by default they are automatically pointed to ../../git_clones/firefox):
|
|
41 | 41 | - `/tools/browser/basebrowser` -> `/path/to/local/tor-browser.git`
|
42 | 42 | - `/tools/browser/mullvadbrowser` -> `/path/to/local/mullvad-browser.git`
|
43 | 43 | - `/tools/browser/torbrowser` -> `/path/to/local/tor-browser.git`
|
44 | -- The user must first checkout the relevant branch of the commit we are tagging
|
|
44 | +- The user must first checkout the relevant branch (local or remote-tracking) of the commit we are tagging
|
|
45 | 45 | - This is needed to extract the ESR version, branch-number, and browser name
|
46 | 46 | |
47 | 47 | #### Usage
|
... | ... | @@ -93,4 +93,4 @@ Invoke the relevant soft-link'd version of this script to sign a particular brow |
93 | 93 | Tag commit 385aa0559a90 in mullvad-browser-128.4.0esr-14.0-1
|
94 | 94 | tag: mullvad-browser-128.4.0esr-14.0-1-build2
|
95 | 95 | message: Tagging build2 for 128.4.0esr-based stable
|
96 | - ``` |
|
\ No newline at end of file | ||
96 | + ``` |
... | ... | @@ -18,7 +18,9 @@ browser=$(echo "$script_name" | perl -pe 's/^[^\.]+\.//') |
18 | 18 | case "${browser}" in
|
19 | 19 | basebrowser | torbrowser | mullvadbrowser)
|
20 | 20 | # go down to browser directory
|
21 | - pushd ${script_dir}/${browser} > /dev/null
|
|
21 | + browser_dir="$script_dir/$browser"
|
|
22 | + [ -e "$browser_dir" ] || ln -s "../../git_clones/firefox" "$browser_dir"
|
|
23 | + pushd "$browser_dir" > /dev/null
|
|
22 | 24 | # and exit on script termination
|
23 | 25 | trap "popd > /dev/null" EXIT
|
24 | 26 | ;;
|
... | ... | @@ -33,7 +35,7 @@ esac |
33 | 35 | # and message
|
34 | 36 | #
|
35 | 37 | |
36 | -branch_name=$(git rev-parse --abbrev-ref HEAD)
|
|
38 | +branch_name=$(git log -n1 --oneline --decorate=short | grep -Eo '[a-z]+-browser-[1-9][0-9]+[^),]*-[1-9]' | head -n1)
|
|
37 | 39 | if [[ $branch_name =~ ^([a-z]+-browser)-([1-9][0-9]+\.[0-9]+)(\.[0-9]+esr|a[1-9][0-9]*)-([1-9][0-9]*\.[05])-([1-9]).*$ ]]; then
|
38 | 40 | project="${BASH_REMATCH[1]}"
|
39 | 41 | upstream="${BASH_REMATCH[2]}${BASH_REMATCH[3]}"
|
... | ... | @@ -77,8 +79,10 @@ commit=$(git rev-parse --short ${3:-HEAD}) |
77 | 79 | |
78 | 80 | # channel validation
|
79 | 81 | if [[ "${project}" == "mullvad-browser" ]]; then
|
82 | + repo="$project"
|
|
80 | 83 | valid_channels=("rapid" "alpha" "stable")
|
81 | 84 | else
|
85 | + repo="tor-browser"
|
|
82 | 86 | valid_channels=("rapid" "alpha" "stable" "legacy")
|
83 | 87 | fi
|
84 | 88 | channel_valid=false
|
... | ... | @@ -113,3 +117,9 @@ echo " tag: ${tag}" |
113 | 117 | echo " message: ${message}"
|
114 | 118 | |
115 | 119 | git tag -s "${tag}" "${commit}" -m "${message}"
|
120 | + |
|
121 | +read -p "Do you want to push ${tag} to ${repo}.git? (y/N) " -n 1 -r
|
|
122 | +echo
|
|
123 | +if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
124 | + git push "git@gitlab.torproject.org:tpo/applications/${repo}.git" "${tag}"
|
|
125 | +fi |