[tor-commits] [tor-browser-build/master] Add script to help tagging a release

boklm at torproject.org boklm at torproject.org
Mon Aug 7 22:48:42 UTC 2017


commit 5a438172202b385f962f3b715efff2b20be859f8
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Tue Aug 8 00:37:15 2017 +0200

    Add script to help tagging a release
    
    The 'make signtag-release' and 'make signtag-alpha' commands can be
    used to tag a stable or alpha release using the version informations
    from rbm.conf.
---
 Makefile                 | 6 ++++++
 projects/release/config  | 6 ++++++
 projects/release/signtag | 8 ++++++++
 rbm                      | 2 +-
 rbm.conf                 | 1 +
 rbm.local.conf.example   | 5 +++++
 6 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b82309c..274e11c 100644
--- a/Makefile
+++ b/Makefile
@@ -80,6 +80,12 @@ testbuild-osx-x86_64: submodule-update
 hardened-linux-x86_64: submodule-update
 	$(rbm) build release --target hardened --target torbrowser-linux-x86_64
 
+signtag-release: submodule-update
+	$(rbm) build release --step signtag --target release
+
+signtag-alpha: submodule-update
+	$(rbm) build release --step signtag --target alpha
+
 submodule-update:
 	git submodule update --init
 
diff --git a/projects/release/config b/projects/release/config
index 8beea7e..db62a95 100644
--- a/projects/release/config
+++ b/projects/release/config
@@ -117,3 +117,9 @@ input_files:
      - torbrowser-windows-i686
      - expert-bundle
 
+steps:
+  signtag:
+    build_log: '-'
+    debug: 0
+    input_files: []
+    signtag: '[% INCLUDE signtag %]'
diff --git a/projects/release/signtag b/projects/release/signtag
new file mode 100644
index 0000000..3ce2e48
--- /dev/null
+++ b/projects/release/signtag
@@ -0,0 +1,8 @@
+#!/bin/bash
+[% c("var/set_default_env") -%]
+# reset HOME which was changed by var/set_default_env, for gpg/git
+[% IF ENV.HOME %]export HOME="[% ENV.HOME %]"[% END %]
+cd [% c("basedir") %]
+git tag [% c("buildconf/git_signtag_opt") %] -m \
+        'Tagging [% c("var/torbrowser_build") %] for [% c("var/torbrowser_version") %]' \
+        tbb-[% c("var/torbrowser_version") %]-[% c("var/torbrowser_build") %]
diff --git a/rbm b/rbm
index ff4299f..31be478 160000
--- a/rbm
+++ b/rbm
@@ -1 +1 @@
-Subproject commit ff4299fcf372aef5d28fe7024a60d81d413fcd6f
+Subproject commit 31be478688e0448d36373d21939922f2a108aeea
diff --git a/rbm.conf b/rbm.conf
index 13d19a5..6745cdc 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -11,6 +11,7 @@ pkg_type: build
 # in var/build_id, so that changing this option does not affect the build_id.
 buildconf:
   num_procs: '[% GET ENV.RBM_NUM_PROCS ? ENV.RBM_NUM_PROCS : "4" %]'
+  git_signtag_opt: '-s'
 
 var:
   torbrowser_version: '7.5a4'
diff --git a/rbm.local.conf.example b/rbm.local.conf.example
index a4b0212..e30d8a8 100644
--- a/rbm.local.conf.example
+++ b/rbm.local.conf.example
@@ -29,6 +29,11 @@ buildconf:
   ### RBM_NUM_PROCS environment variable. The default is 4.
   #num_procs: 8
 
+  ### The buildconf/git_signtag_opt option is useful when you tag a release.
+  ### It is used to set the 'git tag' argument to select the keyid for
+  ### signing the tag.
+  #git_signtag_opt: '-u keyid'
+
 var:
   local_conf: 1
 



More information about the tor-commits mailing list