commit: d4ea114eb8dfcad0893b6fe29de7f76c83d273d4
parent: b00980f2af3e82c0d6c358d0ad00b4a534c1e861
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 6 May 2018 21:30:33 +0200
bin/archive-tags: script for archiving tags based on stagit provided example one
Diffstat:
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/bin/archive-tags b/bin/archive-tags
@@ -0,0 +1,16 @@
+#!/bin/sh
+workdir=$(git rev-parse --show-toplevel)
+name=$(basename ${workdir})
+mkdir "${workdir}.archives"
+git tag -l | while read -r t; do
+ f="${workdir}.archives/${name}-$(echo "${t}" | tr '/' '_').tar.gz"
+ test -f "${f}" && continue
+ git archive \
+ --format tar.gz \
+ --prefix "${t}/" \
+ -o "${f}" \
+ -- \
+ "${t}"
+
+ gpg --detach-sign "${f}"
+done