summaryrefslogtreecommitdiff
path: root/tag
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-20 10:21:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-20 10:21:57 +0200
commitc7aed7b90e4f306afb1b09664de0c1e70b962f26 (patch)
treec3c1be6d4b0409b4ae693ee101933437e814dfbe /tag
parentdb4f4539ac99eb18bad72a184964398919b25d6d (diff)
Add release scripts, doc
Diffstat (limited to 'tag')
-rwxr-xr-xtag44
1 files changed, 44 insertions, 0 deletions
diff --git a/tag b/tag
new file mode 100755
index 0000000..bf664cc
--- /dev/null
+++ b/tag
@@ -0,0 +1,44 @@
+#! /usr/bin/env bash
+
+# Tag build2 distribution.
+#
+# Usage: tag [-t]
+#
+# -t
+# Toolchain only.
+#
+usage="usage: $0 [-t]"
+
+owd=`pwd`
+trap "{ cd $owd; exit 1; }" ERR
+
+function info () { echo "$*" 1>&2; }
+function error () { info "$*"; exit 1; }
+
+toolchain="libbutl build2 libbpkg bpkg build2-toolchain"
+extras="brep"
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ -t)
+ extra=
+ shift
+ ;;
+ *)
+ error "unexpected $1"
+ ;;
+ esac
+done
+
+tools="$toolchain $extras"
+
+for t in $tools; do
+ v=`cat $t/version`
+ if [ -z "$v" ]; then
+ error "unable to extract version from $t/version"
+ fi
+ git -C $t tag -a $v -M "Tag version $v"
+ info "tagged $t $v"
+done
+
+info "remember to push"