aboutsummaryrefslogtreecommitdiffstats
path: root/posts
diff options
context:
space:
mode:
authorFran├žois Kooman <fkooman@tuxed.net>2019-04-23 23:05:19 +0200
committerFran├žois Kooman <fkooman@tuxed.net>2019-04-23 23:05:19 +0200
commitd3a923fef29be6ff1d74e5adc36c49d74cdee471 (patch)
treebfd24bbd6679e869fe6cabfcc921b39c1f6b33df /posts
parent6fbd1764572dcc3e6c96b57860185513684a6590 (diff)
downloadwww.tuxed.net-d3a923fef29be6ff1d74e5adc36c49d74cdee471.zip
www.tuxed.net-d3a923fef29be6ff1d74e5adc36c49d74cdee471.tar.gz
www.tuxed.net-d3a923fef29be6ff1d74e5adc36c49d74cdee471.tar.xz
update post
Diffstat (limited to 'posts')
-rw-r--r--posts/git_signed_releases.md16
1 files changed, 13 insertions, 3 deletions
diff --git a/posts/git_signed_releases.md b/posts/git_signed_releases.md
index 235d876..a452927 100644
--- a/posts/git_signed_releases.md
+++ b/posts/git_signed_releases.md
@@ -1,7 +1,7 @@
---
title: Creating Signed Releases of your Git Projects
published: 2018-06-08
-modified: 2018-06-26
+modified: 2019-04-23
---
This post describes how to create a PGP signed software release from your Git
@@ -22,6 +22,7 @@ Now, with that out of the way, you can put the following POSIX shell script in
#!/bin/sh
PROJECT_NAME=$(basename "${PWD}")
PROJECT_VERSION=${1}
+ RELEASE_DIR="${PWD}/release"
if [ -z "${1}" ]
then
@@ -30,8 +31,15 @@ Now, with that out of the way, you can put the following POSIX shell script in
echo Version: "${PROJECT_VERSION}"
fi
- git archive --prefix "${PROJECT_NAME}-${PROJECT_VERSION}/" "${PROJECT_VERSION}" -o "${PROJECT_NAME}-${PROJECT_VERSION}.tar.xz"
- gpg2 --armor --detach-sign --yes "${PROJECT_NAME}-${PROJECT_VERSION}.tar.xz"
+ mkdir -p "${RELEASE_DIR}"
+ if [ -f "${RELEASE_DIR}/${PROJECT_NAME}-${PROJECT_VERSION}.tar.xz" ]
+ then
+ echo "Version ${PROJECT_VERSION} already has a release!"
+ exit 1
+ fi
+
+ git archive --prefix "${PROJECT_NAME}-${PROJECT_VERSION}/" "${PROJECT_VERSION}" -o "${RELEASE_DIR}/${PROJECT_NAME}-${PROJECT_VERSION}.tar.xz"
+ gpg2 --armor --detach-sign --yes "${RELEASE_DIR}/${PROJECT_NAME}-${PROJECT_VERSION}.tar.xz"
### Creating a Release
@@ -68,3 +76,5 @@ software.
**UPDATE** (2018-06-26): add the `--yes` flag to `gpg2` to avoid it asking
to overwrite the signature file
+
+**UPDATE** (2019-04-23): do not overwrite existing release(s)