From 8baaa6fa8935b6ae938ef30eca8a668b08d7dc8c Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Thu, 8 Sep 2016 23:17:44 +0800 Subject: [PATCH] auto generate version from git, close #11 --- .gopack.yml | 2 +- deploy.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gopack.yml b/.gopack.yml index 4b93980..def1aae 100644 --- a/.gopack.yml +++ b/.gopack.yml @@ -5,4 +5,4 @@ includes: [] excludes: - \.git script: - - go build -tags bindata + - go build -tags bindata -ldflags "-X main.Version=$(git describe --tags --dirty --always)" diff --git a/deploy.sh b/deploy.sh index fc599d7..2eaef75 100755 --- a/deploy.sh +++ b/deploy.sh @@ -36,11 +36,12 @@ then fi # TODO: Replace app_xxx with correct application ID +V=$(git describe --tags --dirty --always) ./equinox release \ --channel="$CHANNEL" \ --version="$VERSION" \ --app="app_8Gji4eEAdDx" \ - --platforms="darwin_amd64 linux_amd64 linux_386" \ + --platforms="darwin_amd64 linux_amd64" \ --signing-key="equinox.key" \ --token="$EQUINOX_API_TOKEN" \ - -- -tags bindata -ldflags "-X main.Version=$TRAVIS_COMMIT" + -- -tags bindata -ldflags "-X main.Version=$V"