Skip to content

Commit 75d1634

Browse files
committed
That didn't work. Is this better solution?
1 parent 74b8fe4 commit 75d1634

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626

2727
- name: Deduce tags
2828
run: |
29-
git fetch --tags # does this fix shallow clone?
3029
mkdir source
3130
echo "latest" > source/tags
3231
if tag=$(git describe --exact-match --tags)

setgitversion

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@ file="src/ShellCheck/Data.hs"
77
test -e "$file"
88
tmp=$(mktemp)
99
version=$(git describe)
10+
if [ -z "$version" ]
11+
then
12+
short_commit=$(git rev-parse --short HEAD)
13+
version="0.0.0-g$short_commit"
14+
fi
1015
sed -e "s/=.*VERSIONSTRING.*/= \"$version\" -- VERSIONSTRING, DO NOT SUBMIT/" "$file" > "$tmp"
1116
mv "$tmp" "$file"

0 commit comments

Comments
 (0)