Skip to content

Commit

Permalink
adjust build
Browse files Browse the repository at this point in the history
  • Loading branch information
honwen committed Jan 24, 2019
1 parent c852af2 commit 91eba54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""

Expand Down

0 comments on commit 91eba54

Please sign in to comment.