Use git-tagged version when packaging

`git describe --tags` returns a version string like '5.2-36-g15f7925'
when on commit g15f7925, which is 36 commits after the tag 5.2.
This is a more clear version when between releases.
pull/1208/head
Andrew Archibald 2021-02-15 14:37:28 -07:00 zatwierdzone przez Nikita Prokopov
rodzic e2e526c971
commit 888580a05a
2 zmienionych plików z 4 dodań i 16 usunięć

Wyświetl plik

@ -5,3 +5,6 @@ dep:
build:
docker run --rm -v ${PWD}:/opt fira:latest ./script/build
package:
./script/package

Wyświetl plik

@ -1,22 +1,7 @@
#!/bin/zsh -euo pipefail
cd "`dirname $0`/.."
setopt BASH_REMATCH
MAJOR=`cat FiraCode.glyphs | grep versionMajor`
VERSION=""
if [[ $MAJOR =~ 'versionMajor = ([0-9]+);' ]] ; then
VERSION="${BASH_REMATCH[2]}"
fi
MINOR=`cat FiraCode.glyphs | grep versionMinor`
if [[ $MINOR =~ 'versionMinor = ([0-9]+);' ]] ; then
MATCH="${BASH_REMATCH[2]}"
if [ "$MATCH" != "0" ] ; then
VERSION="$VERSION.$MATCH"
fi
fi
VERSION="$(git describe --tags)"
FILE="Fira_Code_v$VERSION.zip"
rm -f $FILE