[Git][NTPsec/ntpsec][master] Improved release machinery.
Eric S. Raymond
gitlab at mg.gitlab.com
Thu Dec 1 16:57:08 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
5b50ccfa by Eric S. Raymond at 2016-12-01T11:56:53-05:00
Improved release machinery.
- - - - -
3 changed files:
- devel/README
- + devel/make-tarball
- devel/release
Changes:
=====================================
devel/README
=====================================
--- a/devel/README
+++ b/devel/README
@@ -19,6 +19,9 @@ hacking.txt::
ifdex-ignores::
Lists and explains a large number of internal configuration symbols.
+make-tarball::
+ Script for building a release tarball.
+
packaging.txt::
Guidance for binary package builders.
=====================================
devel/make-tarball
=====================================
--- /dev/null
+++ b/devel/make-tarball
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Make a release tarball from current head. If you give an argument, it
+# will override the version normally taken from ../VERSION. Produces
+# a file named ntpsec-$V.tar.gz.
+#
+# The tricky part is that it has to include the autorevision cache file,
+# which can't be checked into the repo or there'd be an infinite loop.
+#
+# Do not try running this outside of devel/
+#
+# *Do* configure and test-build before running it.
+
+if [ `basename $PWD` != devel ]
+then
+ echo "You are doomed to fail."
+ exit 1
+fi
+
+if [ -r ../wafhelpers/.autorevision-cache ]
+then
+ echo "Autorevision cache file exists, OK"
+else
+ echo "Autorevision cache file does not exist, waf build and try again"
+ exit 1
+fi
+
+set -e
+
+if [ "$1" != "" ]
+then
+ V=$1
+else
+ V=`cat ../VERSION`
+fi
+
+rm -fr .tmp
+(cd ..; git ls-files; echo "wafhelpers/.autorevision-cache") >MANIFEST
+(cd ..; tar --transform="s:^:ntpsec-${V}/:" -T devel/MANIFEST -czf ntpsec-${V}.tar.gz)
+rm MANIFEST
+mv ../ntpsec-${V}.tar.gz .
+
+# end
+
=====================================
devel/release
=====================================
--- a/devel/release
+++ b/devel/release
@@ -3,21 +3,21 @@
#
# Run with no arguments to dry-run this.
-# Check that we really mean it.
+do="echo"
if [ "$1" = "go" ]
then
do=""
-else
- do="echo"
fi
+set -e # Bail out if the tarball build fails
+
+./make-tarball # Build and test the tarball; bail out if that fails
+
V=`cat ../VERSION`
UV=`cat ../VERSION | tr '.' '_'`
K=477C7528 # Release manager's GPG key ID
-do=echo
-
# Tag the version
$do git tag -u ${K} -m "version ${V}" NTPsec_${UV}
@@ -28,9 +28,6 @@ $do git commit -Ssecurity at ntpsec.org -s -m "version ${V}"
$do git push
$do git push --tags
-# Generate release tarball.
-$do git archive --format=tar.gz -v -o ../ntpsec-${V}.tar.gz NTPsec_${UV}
-
# Generate GPG detached signature of the release tarball.
$do gpg -u ${K} --output ntpsec-${V}.tar.gz.sig --detach-sig ntpsec-${V}.tar.gz
@@ -42,6 +39,6 @@ $do gpg -u ${K} -a --output ntpsec-${V}.tar.gz.sum.asc ntpsec-${V}.tar.gz.sum
# Copy the release tarball, GPG detached signature of the release
# tarball, and the signed sha256sum file to the ftp artifact server.
-$do scp ntpsec-${V}.tar* releasemanager at hostname.ntpsec.org:ftp
+#$do scp ntpsec-${V}.tar* releasemanager at hostname.ntpsec.org:ftp
# end
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5b50ccfac5f857543d6b7f672a223d68fb6caa3a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161201/45f3b9ca/attachment.html>
More information about the vc
mailing list