Skip to content

Commit

Permalink
feat: Set version in guix based on git tags only
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Nov 14, 2023
1 parent ada5cfa commit 47e38de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions contrib/guix/libexec/codesign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ ACTUAL_OUTDIR="${OUTDIR}"
OUTDIR="${DISTSRC}/output"

git_head_version() {
local recent_tag
if recent_tag="$(git -C "$1" describe --exact-match HEAD 2> /dev/null)"; then
echo "${recent_tag#v}"
else
git -C "$1" rev-parse --short=12 HEAD
fi
recent_tag="$(git -C "$1" describe --abbrev=12 --dirty 2> /dev/null)"
echo "${recent_tag#v}"
}

CODESIGNATURE_GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}-codesignatures-$(git_head_version "$DETACHED_SIGS_REPO").tar.gz"
Expand Down
8 changes: 2 additions & 6 deletions contrib/shell/git-utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ git_root() {
}

git_head_version() {
local recent_tag
if recent_tag="$(git describe --exact-match HEAD 2> /dev/null)"; then
echo "${recent_tag#v}"
else
git rev-parse --short=12 HEAD
fi
recent_tag="$(git describe --abbrev=12 --dirty 2> /dev/null)"
echo "${recent_tag#v}"
}

0 comments on commit 47e38de

Please sign in to comment.