From dbc8c2473204ab4b0b6c0d2776ced2952815e965 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Thu, 8 Sep 2016 23:22:14 +0800 Subject: [PATCH] short deploy.sh --- README.md | 5 ++--- deploy.sh | 34 ++++------------------------------ 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 8d0ff9d..624cf33 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,8 @@ Standalone binary can be download from one of the following addresses | Branch | Source | Address | |--------|--------|---------| -| stable | github(Recommend) | | -| stable | equinox| | -| dev | equinox| | +| latest | equinox| | +| stable | github | | Or if you have go enviroment, you can also build from source. diff --git a/deploy.sh b/deploy.sh index 2eaef75..8109f38 100755 --- a/deploy.sh +++ b/deploy.sh @@ -8,40 +8,14 @@ set -eu -o pipefail wget https://bin.equinox.io/c/mBWdkfai63v/release-tool-stable-linux-amd64.tgz tar -vxf release-tool-stable-linux-amd64.tgz -VERSION=$(git describe --abbrev=0 --tags) -REVCNT=$(git rev-list --count HEAD) -DEVCNT=$(git rev-list --count $VERSION) -ISDEV=false -if test $REVCNT != $DEVCNT -then - VERSION="$VERSION.dev$(expr $REVCNT - $DEVCNT)" - ISDEV=true -fi -echo "VER: $VERSION" +VER=$(git describe --tags --dirty --always) +echo "VER: $VER" -GITCOMMIT=$(git rev-parse HEAD) -BUILDTIME=$(date -u +%Y/%m/%d-%H:%M:%S) - -LDFLAGS="-X main.VERSION=$VERSION -X main.BUILDTIME=$BUILDTIME -X main.GITCOMMIT=$GITCOMMIT" -if [[ -n "${EX_LDFLAGS:-""}" ]] -then - LDFLAGS="$LDFLAGS $EX_LDFLAGS" -fi - -echo $VERSION -CHANNEL="stable" -if test "$ISDEV" = "true" -then - CHANNEL="dev" -fi - -# TODO: Replace app_xxx with correct application ID -V=$(git describe --tags --dirty --always) ./equinox release \ - --channel="$CHANNEL" \ + --channel="stable" \ --version="$VERSION" \ --app="app_8Gji4eEAdDx" \ --platforms="darwin_amd64 linux_amd64" \ --signing-key="equinox.key" \ --token="$EQUINOX_API_TOKEN" \ - -- -tags bindata -ldflags "-X main.Version=$V" + -- -tags bindata -ldflags "-X main.Version=$VER"