From 61c6eeca9a45b1454fb3be44e238f4c5f7d8b3f6 Mon Sep 17 00:00:00 2001 From: Oscar Bonilla Date: Wed, 16 Oct 2019 11:24:44 +0800 Subject: [PATCH] Use lightweight tags in git describe (#374) GitHub actions doesn't seem to trigger releases on annotated tags, so add the --tags flag to the calls to git describe so that it honors lightweight tags. --- scripts/bluepill.sh | 2 +- scripts/bpversion.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bluepill.sh b/scripts/bluepill.sh index 3aa282ba..b7e3307f 100755 --- a/scripts/bluepill.sh +++ b/scripts/bluepill.sh @@ -58,7 +58,7 @@ bluepill_build() } set +o pipefail # package bluepill - TAG=$(git describe --always) + TAG=$(git describe --always --tags) DST="Bluepill-$TAG" mkdir -p build/$DST/bin cp build/Build/Products/Release/{bp,bluepill} build/$DST/bin diff --git a/scripts/bpversion.sh b/scripts/bpversion.sh index 0f3680d4..8424e28b 100755 --- a/scripts/bpversion.sh +++ b/scripts/bpversion.sh @@ -4,7 +4,7 @@ set -euo pipefail OUT_FILE=$1 REPO_ROOT=$(git rev-parse --show-toplevel) -VERSION=$(git describe --always) +VERSION=$(git describe --always --tags) test -z "$VERSION" && VERSION=$(cat "$REPO_ROOT/VERSION") echo "#define BP_VERSION \"$VERSION\"" > "$OUT_FILE" XCODE_VERSION=$(xcodebuild -version | awk 'BEGIN {OFS="";} /Xcode/ {version=$2} /Build version/ {build=$3} END {print version, " (", build, ")";}')