[tbb-commits] [builders/tor-browser-build] 01/32: Bug 40137: Add publication script
gitolite role
git at cupani.torproject.org
Tue May 10 11:33:55 UTC 2022
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch maint-11.0
in repository builders/tor-browser-build.
commit 2e9a30950bd5186de95a119522fda33c9765b38b
Author: Matthew Finkel <sysrqb at torproject.org>
AuthorDate: Tue Nov 17 01:44:21 2020 +0000
Bug 40137: Add publication script
---
tools/update/format_changelog.pl | 64 ++++++++++++++++++++++++++++++++++++++++
tools/update/publish_version.sh | 51 ++++++++++++++++++++++++++++++++
2 files changed, 115 insertions(+)
diff --git a/tools/update/format_changelog.pl b/tools/update/format_changelog.pl
new file mode 100755
index 0000000..c469b37
--- /dev/null
+++ b/tools/update/format_changelog.pl
@@ -0,0 +1,64 @@
+#!/usr/bin/perl -w
+
+# Read ChangeLog.txt from stdin
+# $ ./format_changelog.pl < ChangeLog.txt
+
+my $once = 0;
+my $last_indent=0;
+
+sub finish {
+ while ($last_indent > 2) {
+ print "</ul>\n";
+ # Every entry in the ChangeLog is indented by 2 characters
+ # except for the first Platform line
+ $last_indent -= 2
+ }
+ exit;
+}
+
+while (<>) {
+ #print "$_";
+ my $line = "";
+ if ($_ =~ /^Tor Browser /) {
+ finish() unless $once == 0;
+ $once = 1;
+ next;
+ }
+ # Skip empty lines
+ if ($_ =~ /^\s*$/) {
+ next;
+ }
+ #print ">>> $_";
+ if ($_ =~ /(\s+)\* Bug (\d+):(.*)$/) {
+ my $indentation = $1;
+ my $bug = $2;
+ my $description = $3;
+ my $current_indent = length($indentation);
+ if ($current_indent > $last_indent) {
+ $line = "<ul>";
+ } elsif ($current_indent < $last_indent) {
+ $line = "</ul>";
+ }
+ $last_indent = $current_indent;
+ if ($bug < 40000) {
+ $line.="<li><a href=\"https://bugs.torproject.org/$bug\">Bug $bug</a>:$3</li>";
+ } else {
+ $description =~ /(.*)\[([a-z-]*)\]$/;
+ my $project = "tpo/applications/$2/$bug" // "$bug";
+ $line.="<li><a href=\"https://bugs.torproject.org/$project\">Bug $bug</a>:$1</li>";
+ }
+ } elsif ($_ =~ /(\s+)\* (.*)$/) {
+ my $indentation = $1;
+ my $current_indent = length($indentation);
+ if ($current_indent > $last_indent) {
+ $line = "<ul>";
+ } elsif ($current_indent < $last_indent) {
+ $line = "</ul>";
+ }
+ $last_indent = $current_indent;
+ $line .= "<li>$2";
+ } else {
+ $line = $_;
+ }
+ print "$line\n";
+}
diff --git a/tools/update/publish_version.sh b/tools/update/publish_version.sh
new file mode 100755
index 0000000..25083e3
--- /dev/null
+++ b/tools/update/publish_version.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+set -e
+
+TORBROWSER_VERSION=$1
+if [ -z "${TORBROWSER_VERSION}" ]; then
+ echo "please specify version number (excluding -buildN)"
+ exit 1
+fi
+
+PREV_TORBROWSER_VERSION=$2
+if [ -z "${PREV_TORBROWSER_VERSION}" ]; then
+ echo "please specify a previous version number (needed for copying .htaccess file)"
+ exit 1
+fi
+
+TORBROWSER_UPDATE_CHANNEL=$3
+if [ -z "${TORBROWSER_UPDATE_CHANNEL}" ]; then
+ echo "please specify the release channel (release|alpha)"
+ exit 1
+fi
+
+wget --continue -nH --cut-dirs=2 -r -l 1 "https://people.torproject.org/~sysrqb/builds/${TORBROWSER_VERSION}"
+#wget --continue -nH --cut-dirs=2 -r -l 1 "https://people.torproject.org/~gk/builds/${TORBROWSER_VERSION}"
+rm "${TORBROWSER_VERSION}/index.html*"
+
+# Rename the update responses directory to .old to make it easier to
+# revert in case of problem (see the file RollingBackUpdate for more
+# details about this)
+rm -rf "/srv/aus1-master.torproject.org/htdocs/torbrowser/update_3/${TORBROWSER_UPDATE_CHANNEL}.old"
+mv /srv/aus1-master.torproject.org/htdocs/torbrowser/update_3/"${TORBROWSER_UPDATE_CHANNEL}"{,.old}
+
+date
+mv "${TORBROWSER_VERSION}" /srv/dist-master.torproject.org/htdocs/torbrowser/
+cp "/srv/dist-master.torproject.org/htdocs/torbrowser/${PREV_TORBROWSER_VERSION}/.htaccess" "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}/"
+chmod 775 "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
+chmod 664 "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"/*
+chown -R :torwww "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
+cd "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
+for i in *.asc; do echo "$i"; gpg -q "$i" || exit; done
+date
+static-update-component dist.torproject.org
+
+mkdir "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
+chmod 775 "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
+cd "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
+for marfile in /srv/dist-master.torproject.org/htdocs/torbrowser/"${TORBROWSER_VERSION}"/*.mar; do ln -f "${marfile}" .; done
+date
+static-update-component cdn.torproject.org
+
+echo "Now sync and publish update responses"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list