mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-23 06:36:17 +00:00
Tag or SHA
This commit is contained in:
parent
0970d3a971
commit
3990b87f33
1 changed files with 9 additions and 1 deletions
10
.drone.sh
10
.drone.sh
|
@ -1,8 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
VERSION=$DRONE_TAG
|
||||||
|
|
||||||
|
if [ -z "$VERSION" ]; then
|
||||||
|
VERSION=$DRONE_COMMIT_SHA
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building $VERSION"
|
||||||
|
|
||||||
go build -ldflags '-extldflags "-static" -X github.com/laszlocph/woodpecker/version.Version='${DRONE_TAG} -o release/drone-server github.com/laszlocph/woodpecker/cmd/drone-server
|
go build -ldflags '-extldflags "-static" -X github.com/laszlocph/woodpecker/version.Version='${DRONE_TAG} -o release/drone-server github.com/laszlocph/woodpecker/cmd/drone-server
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-X github.com/laszlocph/woodpecker/version.Version='${DRONE_TAG} -o release/drone-agent github.com/laszlocph/woodpecker/cmd/drone-agent
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-X github.com/laszlocph/woodpecker/version.Version='${DRONE_TAG} -o release/drone-agent github.com/laszlocph/woodpecker/cmd/drone-agent
|
||||||
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags '-X github.com/laszlocph/woodpecker/version.Version='${DRONE_TAG} -o release/linux/arm64/drone-agent github.com/laszlocph/woodpecker/cmd/drone-agent
|
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags '-X github.com/laszlocph/woodpecker/version.Version='${DRONE_TAG} -o release/linux/arm64/drone-agent github.com/laszlocph/woodpecker/cmd/drone-agent
|
||||||
|
|
Loading…
Reference in a new issue