From 888580a05a28d864b2289cf6ade6470e97702b84 Mon Sep 17 00:00:00 2001 From: Andrew Archibald Date: Mon, 15 Feb 2021 14:37:28 -0700 Subject: [PATCH] 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. --- Makefile | 3 +++ script/package | 17 +---------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 680d701..1bb765e 100644 --- a/Makefile +++ b/Makefile @@ -5,3 +5,6 @@ dep: build: docker run --rm -v ${PWD}:/opt fira:latest ./script/build + +package: + ./script/package diff --git a/script/package b/script/package index 6d56f27..e4e684c 100755 --- a/script/package +++ b/script/package @@ -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