Build binary from right folder

This commit is contained in:
Thomas Boerger 2019-01-23 11:30:36 +01:00
parent 8d6fcd6b8c
commit 0edfc64715
No known key found for this signature in database
GPG Key ID: 09745AFF9D63C79B
3 changed files with 10 additions and 10 deletions

View File

@ -51,7 +51,7 @@ local PipelineBuild(os="linux", arch="amd64") = {
GO111MODULE: "on", GO111MODULE: "on",
}, },
commands: [ commands: [
"go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/" + os + "/" + arch + "/drone-hugo", "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/" + os + "/" + arch + "/drone-hugo ./cmd/drone-hugo",
], ],
when: { when: {
event: [ "push", "pull_request" ], event: [ "push", "pull_request" ],
@ -66,7 +66,7 @@ local PipelineBuild(os="linux", arch="amd64") = {
GO111MODULE: "on", GO111MODULE: "on",
}, },
commands: [ commands: [
"go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/" + os + "/" + arch + "/drone-hugo", "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/" + os + "/" + arch + "/drone-hugo ./cmd/drone-hugo",
], ],
when: { when: {
event: [ "tag" ], event: [ "tag" ],

View File

@ -11,7 +11,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/windows/amd64/drone-hugo" - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/windows/amd64/drone-hugo" ./cmd/drone-hugo
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -24,7 +24,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/windows/amd64/drone-hugo" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/windows/amd64/drone-hugo" ./cmd/drone-hugo
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on

View File

@ -40,7 +40,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-hugo" - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-hugo ./cmd/drone-hugo"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -53,7 +53,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-hugo" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-hugo ./cmd/drone-hugo"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -120,7 +120,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm64/drone-hugo" - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm64/drone-hugo ./cmd/drone-hugo"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -133,7 +133,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm64/drone-hugo" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm64/drone-hugo ./cmd/drone-hugo"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -200,7 +200,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm/drone-hugo" - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm/drone-hugo ./cmd/drone-hugo"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -213,7 +213,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm/drone-hugo" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm/drone-hugo ./cmd/drone-hugo"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on