1
0
forked from um/cli

ci: fix file exist

This commit is contained in:
Unlock Music Dev 2022-11-27 07:50:04 +08:00
parent e7d360362e
commit 7637a91f71
Signed by untrusted user: um-dev
GPG Key ID: 95202E10D3413A1D
2 changed files with 11 additions and 0 deletions

View File

@ -28,6 +28,7 @@ local StepGoBuild(GOOS, GOARCH) = {
commands: [ commands: [
'DIST_DIR=$(mktemp -d)', 'DIST_DIR=$(mktemp -d)',
'go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags --always)" -o $DIST_DIR ./cmd/um', 'go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags --always)" -o $DIST_DIR ./cmd/um',
'mkdir -p dist',
'tar cz -f %s -C $DIST_DIR .' % filepath, 'tar cz -f %s -C $DIST_DIR .' % filepath,
], ],
}; };

View File

@ -14,6 +14,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-linux-amd64.tar.gz -C $DIST_DIR . - tar cz -f dist/um-linux-amd64.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: amd64 GOARCH: amd64
@ -48,6 +49,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-windows-amd64.tar.gz -C $DIST_DIR . - tar cz -f dist/um-windows-amd64.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: amd64 GOARCH: amd64
@ -82,6 +84,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-darwin-amd64.tar.gz -C $DIST_DIR . - tar cz -f dist/um-darwin-amd64.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: amd64 GOARCH: amd64
@ -120,6 +123,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-linux-amd64.tar.gz -C $DIST_DIR . - tar cz -f dist/um-linux-amd64.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: amd64 GOARCH: amd64
@ -130,6 +134,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-linux-arm64.tar.gz -C $DIST_DIR . - tar cz -f dist/um-linux-arm64.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: arm64 GOARCH: arm64
@ -140,6 +145,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-linux-386.tar.gz -C $DIST_DIR . - tar cz -f dist/um-linux-386.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: "386" GOARCH: "386"
@ -150,6 +156,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-windows-amd64.tar.gz -C $DIST_DIR . - tar cz -f dist/um-windows-amd64.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: amd64 GOARCH: amd64
@ -160,6 +167,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-windows-386.tar.gz -C $DIST_DIR . - tar cz -f dist/um-windows-386.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: "386" GOARCH: "386"
@ -170,6 +178,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-darwin-amd64.tar.gz -C $DIST_DIR . - tar cz -f dist/um-darwin-amd64.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: amd64 GOARCH: amd64
@ -180,6 +189,7 @@ steps:
- DIST_DIR=$(mktemp -d) - DIST_DIR=$(mktemp -d)
- go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags - go build -v -trimpath -ldflags="-w -s -X main.AppVersion=$(git describe --tags
--always)" -o $DIST_DIR ./cmd/um --always)" -o $DIST_DIR ./cmd/um
- mkdir -p dist
- tar cz -f dist/um-darwin-arm64.tar.gz -C $DIST_DIR . - tar cz -f dist/um-darwin-arm64.tar.gz -C $DIST_DIR .
environment: environment:
GOARCH: arm64 GOARCH: arm64