aboutsummaryrefslogtreecommitdiff
path: root/gen-openbsd-tags.sh
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2015-09-10 11:19:35 -0500
committerBrent Cook <bcook@openbsd.org>2015-09-10 11:50:16 -0500
commit1ea6203cbf2af3a83d723365ea7561fe62aabb4a (patch)
treeb40b194728b4e312c58fc63e846cd1a23a5ac6be /gen-openbsd-tags.sh
parentb6aded059f68306181216d1a5abc03a47d5eb1c5 (diff)
downloadportable-1ea6203cbf2af3a83d723365ea7561fe62aabb4a.tar.gz
portable-1ea6203cbf2af3a83d723365ea7561fe62aabb4a.tar.bz2
portable-1ea6203cbf2af3a83d723365ea7561fe62aabb4a.zip
add openbsd tag sync script + release verifier
gen-openbsd-tags.sh synchronizes local tags from the portable tree with the openbsd git mirror. It does this by matching commit timestamps, which can handle rehashing due to modifications of the git import scope if we need it later. check-release.sh generates a release tarball and compares it to an actual release. This has shown a few mistakes in past release, but we can use it to ensure are no issues with future releases.
Diffstat (limited to 'gen-openbsd-tags.sh')
-rwxr-xr-xgen-openbsd-tags.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/gen-openbsd-tags.sh b/gen-openbsd-tags.sh
new file mode 100755
index 0000000..a500c76
--- /dev/null
+++ b/gen-openbsd-tags.sh
@@ -0,0 +1,20 @@
1#!/bin/sh
2set -e
3
4for tag in `git tag`; do
5 branch=master
6 if [[ $tag = v2.0* ]]; then
7 branch=OPENBSD_5_6
8 elif [[ $tag = v2.1* ]]; then
9 branch=OPENBSD_5_7
10 elif [[ $tag = v2.2* ]]; then
11 branch=OPENBSD_5_8
12 elif [[ $tag = v2.3* ]]; then
13 branch=OPENBSD_5_9
14 fi
15 # adjust for 9 hour timezone delta between trees
16 release_ts=$((`git show -s --format=%ct $tag|tail -n1` + 32400))
17 commit=`git -C openbsd rev-list -n 1 --before=$release_ts $branch`
18 git -C openbsd tag -f libressl-$tag $commit
19 echo Tagged $tag as $commit in openbsd
20done