[tbb-commits] [builders/tor-browser-build] 04/32: Bug 40414: Add common config and functions files

gitolite role git at cupani.torproject.org
Wed Apr 20 09:38:41 UTC 2022


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 4c07cbeb6159b36dfc0e019b48e77ede79dd6f49
Author: Nicolas Vigier <boklm at torproject.org>
AuthorDate: Fri Jan 14 12:25:06 2022 +0100

    Bug 40414: Add common config and functions files
    
    Add common config file used to set Tor Browser version (and later other
    things). We also add a `functions` file where we can put functions used
    in multiple scripts.
    
    The following lines can be used at the top of a script to use the config
    and functions files:
    
      script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
      source "$script_dir/functions"
---
 tools/signing/functions              | 16 ++++++++++++++++
 tools/signing/set-config             |  1 +
 tools/signing/set-config.tbb-version |  7 +++++++
 3 files changed, 24 insertions(+)

diff --git a/tools/signing/functions b/tools/signing/functions
new file mode 100644
index 0000000..f53f6ed
--- /dev/null
+++ b/tools/signing/functions
@@ -0,0 +1,16 @@
+function exit_error {
+  for msg in "$@"
+  do
+    echo "$msg" > /dev/stderr
+  done
+  exit 1
+}
+
+function var_is_defined {
+  for var in "$@"
+  do
+    test -n "${!var}" || exit_error "$var is not defined (see set-config* files)"
+  done
+}
+
+. "$script_dir/set-config"
diff --git a/tools/signing/set-config b/tools/signing/set-config
new file mode 100644
index 0000000..70f1200
--- /dev/null
+++ b/tools/signing/set-config
@@ -0,0 +1 @@
+. "$script_dir/set-config.tbb-version"
diff --git a/tools/signing/set-config.tbb-version b/tools/signing/set-config.tbb-version
new file mode 100644
index 0000000..5e844b5
--- /dev/null
+++ b/tools/signing/set-config.tbb-version
@@ -0,0 +1,7 @@
+# The following 3 lines should be uncommented and updated:
+
+#tbb_version=11.5a4
+#tbb_version_build=1
+#tbb_version_type=alpha
+
+var_is_defined tbb_version tbb_version_build tbb_version_type

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list