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