From 91eba5473c18f8706d6e1059321e21155265b4a3 Mon Sep 17 00:00:00 2001 From: hwchan Date: Thu, 24 Jan 2019 16:12:44 +0800 Subject: [PATCH] adjust build --- Dockerfile | 2 +- build-release.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e7ee51a..d16a746 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ RUN apk add --update git curl RUN set -ex && \ go get -u -v \ -ldflags "-X main.version=$(curl -sSL https://api.github.com/repos/chenhw2/aliyun-ddns-cli/commits/master | \ - sed -n '{/sha/p; /date/p;}' | sed 's/.* \"//g' | cut -c1-10 | tr [:lower:] [:upper:] | sed 'N;s/\n/@/g' | head -1)" \ + sed -n '{/sha/p; /date/p;}' | sed 's/.* \"//g' | cut -c1-10 | tr '[:lower:]' '[:upper:]' | sed 'N;s/\n/@/g' | head -1)" \ github.com/chenhw2/aliyun-ddns-cli FROM chenhw2/alpine:base diff --git a/build-release.sh b/build-release.sh index 344dc76..c671475 100755 --- a/build-release.sh +++ b/build-release.sh @@ -12,7 +12,7 @@ fi # UPX=true # fi -VERSION=$(curl -sSL https://api.github.com/repos/chenhw2/aliyun-ddns-cli/commits/master | sed -n '{/sha/p; /date/p;}'| sed 's/.* \"//g' | cut -c1-10 | tr "[:lower:]" "[:upper:]" | sed 'N;s/\n/@/g' | head -1) +VERSION=$(curl -sSL https://api.github.com/repos/chenhw2/aliyun-ddns-cli/commits/master | sed -n '{/sha/p; /date/p;}'| sed 's/.* \"//g' | cut -c1-10 | tr '[:lower:]' '[:upper:]' | sed 'N;s/\n/@/g' | head -1) LDFLAGS="-X main.version=$VERSION -s -w -linkmode external -extldflags -static" GCFLAGS=""