[tor-commits] [Git][tpo/applications/tor-browser-build][main] Bug 41286: Update the deploy update scripts to optinally take an override hash

morgan (@morgan) git at gitlab.torproject.org
Wed Oct 30 18:34:11 UTC 2024



morgan pushed to branch main at The Tor Project / Applications / tor-browser-build


Commits:
1c24b4a9 by Nicolas Vigier at 2024-10-30T17:48:34+01:00
Bug 41286: Update the deploy update scripts to optinally take an override hash

- - - - -


2 changed files:

- .gitlab/issue_templates/Release Prep - Tor Browser Legacy.md
- tools/signing/upload-update_responses-to-staticiforme


Changes:

=====================================
.gitlab/issue_templates/Release Prep - Tor Browser Legacy.md
=====================================
@@ -268,37 +268,9 @@ popd
         git show -s --format=%H
         ```
   - On `staticiforme.torproject.org`, deploy new update responses:
-    - **NOTE**: for now this is a bit janky, we should somehow update the workflow to be a bit less hacky
-    - [ ] Edit an existing `deploy_update_responses-release.sh` script in your `HOME` directory with the newly pushed commit hash
-      - **example**: (hash: `d938943`)
-        ```bash
-        #!/bin/bash
-        set -e
-
-        echo "Deploying version 14.0"
-        echo "update_responses_commit: d938943"
-
-        cd "/srv/aus1-master.torproject.org/htdocs/torbrowser"
-        git fetch
-        changed_files="$(git diff --name-only HEAD d938943)"
-        if echo "$changed_files" | grep -qv "release"
-        then
-          echo >&2 "Error: checking out new update_response_commit will changes"
-          echo >&2 "some files outside of the release directory:"
-          echo "$changed_files" | grep -v "release" >&2
-          echo >&2 "--"
-          echo >&2 "If this is really what you want to do, edit this script to"
-          echo >&2 "remove the line 'exit 1' and run it again."
-          echo >&2 "See tor-browser-build#41168 for more details."
-          exit 1
-        fi
-        git checkout "d938943"
-
-        static-update-component aus1.torproject.org
-        ```
-    - [ ] Enable update responses:
+    - [ ] Enable update responses, passing the commit hash as argument (replace $commit):
       ```bash
-      sudo -u tb-release ./deploy_update_responses-release.sh
+      sudo -u tb-release ./deploy_update_responses-release.sh $commit
       ```
 
 </details>


=====================================
tools/signing/upload-update_responses-to-staticiforme
=====================================
@@ -55,12 +55,20 @@ cat << EOF > "$deploy_script"
 #!/bin/bash
 set -e
 
-echo "Deploying version $tbb_version"
-echo "update_responses_commit: $update_responses_commit"
+if test "\$#" -gt 1; then
+  echo >&2 "Wrong number of arguments"
+  exit 2
+fi
+
+commit=$update_responses_commit
+test "\$#" -eq 1 && commit="\$1"
+
+test "\$#" -eq 0 && echo "Deploying version $tbb_version"
+echo "update_responses_commit: \$commit"
 
 cd "$update_dir"
 git fetch
-changed_files="\$(git diff --name-only HEAD $update_responses_commit)"
+changed_files="\$(git diff --name-only HEAD \$commit)"
 if echo "\$changed_files" | grep -qv "$tbb_version_type"
 then
   echo >&2 "Error: checking out new update_response_commit will changes"
@@ -72,7 +80,7 @@ then
   echo >&2 "See tor-browser-build#41168 for more details."
   exit 1
 fi
-git checkout "$update_responses_commit"
+git checkout "\$commit"
 
 static-update-component aus1.torproject.org
 EOF



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1c24b4a9d06ec574e396ad4c3db8f578337a64ca

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1c24b4a9d06ec574e396ad4c3db8f578337a64ca
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20241030/49ddca93/attachment-0001.htm>


More information about the tor-commits mailing list