aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-01-09 15:47:29 +0100
committerJakob Unterwurzacher2016-01-09 15:47:29 +0100
commitb3c9a275c73d89cf0af4dd57daf9ffbcb2a2d891 (patch)
treecf070ba0465ec4cd625b0bf6ff213be83bd3c308
parentecdc58baa363beab5dc951f07ffa1607471c94ef (diff)
package.bash: Encode host distribution into tar filenamev0.7.1
-rw-r--r--.gitignore3
-rwxr-xr-xpackage.bash14
2 files changed, 10 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 93e4413..46b5726 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,8 +4,9 @@
# temporary files created by the tests
/tmp
-# binary releases
+# binary releases and signatiures
/*.tar.gz
+/*.asc
# Binaries created for cpu profiling
*.test
diff --git a/package.bash b/package.bash
index a46a028..cd571ec 100755
--- a/package.bash
+++ b/package.bash
@@ -1,12 +1,14 @@
#!/bin/bash
-set -eux
+set -eu
-source build.bash
+source build.bash # Builds binary and sets GITVERSION (example: v0.7-15-gf01f599)
+source /etc/os-release # Sets ID (example: fedora) and VERSION_ID (example: 23)
+ARCH=$(go env GOARCH)
-ARCH=$(go version | cut -d ' ' -f 4 | tr / -)
-
-TARGZ=gocryptfs_${GITVERSION}_$ARCH.tar.gz
+TARGZ=gocryptfs_${GITVERSION}_${ID}${VERSION_ID}_${ARCH}.tar.gz
tar czf $TARGZ gocryptfs
-ls -lh $TARGZ
+
+echo "Tar created."
+echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $TARGZ"