[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [builders/tor-browser-build] 01/32: Bug 40137: Add publication script
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch master
in repository builders/tor-browser-build.
commit b5e5e4b3c14d7116b505a2ce494479fe2b081a84
Author: Matthew Finkel <sysrqb@xxxxxxxxxxxxxx>
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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits