Modify: update actions (#398)

This commit is contained in:
hiCasper
2020-05-20 11:48:00 +08:00
committed by GitHub
parent e038350cf0
commit a5000c0621
2 changed files with 28 additions and 5 deletions

View File

@@ -55,7 +55,12 @@ _build() {
export CC=$gcc
export CGO_ENABLED=1
out="release/cloudreve_${VERSION}_${os}_${arch}"
if [ -n "$VERSION" ]; then
out="release/cloudreve_${VERSION}_${os}_${arch}"
else
out="release/cloudreve_${COMMIT_SHA}_${os}_${arch}"
fi
go build -a -o "${out}" -ldflags " -X 'github.com/HFO4/cloudreve/pkg/conf.BackendVersion=$VERSION' -X 'github.com/HFO4/cloudreve/pkg/conf.LastCommit=$COMMIT_SHA'"
if [ "$os" = "windows" ]; then