dotfiles/bin/sign-tarball
Andrei Jiroh Halili 8ecadd080e
feat(bashrc): add asdf to bash/tools config directory
This should finally elimate the painful manual exports from
~/.asdf/asdf.sh file after initing submodules post-clone.

Also in this commit, I also edited the sign-tarball script to
not hardcode the GPG key ID when signing. I may implement CLI
flags in the future as needed.

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.xyz>
2024-05-28 16:02:28 +08:00

9 lines
328 B
Bash
Executable file

#!/bin/sh
project="$(basename $(pwd))"
version="$(git describe)"
key="${RELEASE_SIGNING_KEY:-\"940047813E9D641C\"}"
git archive --format=tar.gz --prefix="$project-$version/" "$version" \
>"$project-$version.tar.gz"
gpg --detach-sign "$@" --default-key "$key" "$project-$version.tar.gz" \
>/tmp/"$project-$version".tar.gz.sig