From 051a1b427a1e5fcb6a3b9e8bd7233b0fc0a6f22a Mon Sep 17 00:00:00 2001 From: "Thibault \"bui\" Koechlin" Date: Wed, 3 Jun 2020 15:59:13 +0200 Subject: [PATCH] remove requirement for version in RELEASE.json, the version is guessed from the git tag (#64) --- .github/workflows/build-binary-package.yml | 5 ----- Makefile | 2 +- RELEASE.json | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build-binary-package.yml b/.github/workflows/build-binary-package.yml index b0bdd42b3..35746077b 100644 --- a/.github/workflows/build-binary-package.yml +++ b/.github/workflows/build-binary-package.yml @@ -17,11 +17,6 @@ jobs: id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Check tag == json version - run: | - jsonver=$(cat RELEASE.json | jq -r .Version) - lasttag=$(git for-each-ref --sort=-v:refname --count=1 --format '%(refname)' | cut -d '/' -f3) - if [ ${jsonver} != ${lasttag} ] ; then echo "version mismatch : ${jsonver} in json, ${lasttag} in git" ; exit 2 ; else echo "${jsonver} == ${lasttag}" ; fi - name: Build the binaries run: make release - name: Upload to release diff --git a/Makefile b/Makefile index 353cc73d4..ec6c6a4aa 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ REQUIRE_GOVERSION="1.13" #Current versioning information from env -export BUILD_VERSION=$(shell cat RELEASE.json | jq -r .Version) +export BUILD_VERSION="$(shell git for-each-ref --sort=-v:refname --count=1 --format '%(refname)' | cut -d '/' -f3)" export BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -r 's/[go]+//g')" export BUILD_CODENAME=$(shell cat RELEASE.json | jq -r .CodeName) export BUILD_TIMESTAMP=$(shell date +%F"_"%T) diff --git a/RELEASE.json b/RELEASE.json index d2017fb22..6e89023fd 100644 --- a/RELEASE.json +++ b/RELEASE.json @@ -1,4 +1,3 @@ { - "Version": "v0.1.2", "CodeName": "beta" }