mirror of
https://github.com/thegeeklab/wp-github-comment.git
synced 2024-11-24 13:00:41 +00:00
fix versioning
This commit is contained in:
parent
e4b297a0c7
commit
3768e96926
@ -85,7 +85,7 @@ local PipelineBuildBinaries = {
|
|||||||
commands: [
|
commands: [
|
||||||
'[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}',
|
'[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}',
|
||||||
'mkdir -p release/',
|
'mkdir -p release/',
|
||||||
"cd cmd/drone-github-comment && xgo -ldflags \"-s -w -X main.Version=$$BUILD_VERSION\" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out drone-github-comment .",
|
"cd cmd/drone-github-comment && xgo -ldflags \"-s -w -X main.version=$BUILD_VERSION\" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out drone-github-comment .",
|
||||||
'mv /build/* /drone/src/release/',
|
'mv /build/* /drone/src/release/',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -151,7 +151,8 @@ local PipelineBuildContainer(arch='amd64') = {
|
|||||||
name: 'build',
|
name: 'build',
|
||||||
image: 'golang:1.14',
|
image: 'golang:1.14',
|
||||||
commands: [
|
commands: [
|
||||||
'go build -v -ldflags "-X main.version=${DRONE_TAG:-latest}" -a -tags netgo -o release/' + arch + '/drone-github-comment ./cmd/drone-github-comment',
|
'[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}',
|
||||||
|
'go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/' + arch + '/drone-github-comment ./cmd/drone-github-comment',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
13
.drone.yml
13
.drone.yml
@ -63,7 +63,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}"
|
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}"
|
||||||
- mkdir -p release/
|
- mkdir -p release/
|
||||||
- cd cmd/drone-github-comment && xgo -ldflags "-s -w -X main.Version=$$BUILD_VERSION" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out drone-github-comment .
|
- cd cmd/drone-github-comment && xgo -ldflags "-s -w -X main.version=$BUILD_VERSION" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out drone-github-comment .
|
||||||
- mv /build/* /drone/src/release/
|
- mv /build/* /drone/src/release/
|
||||||
|
|
||||||
- name: executable
|
- name: executable
|
||||||
@ -118,7 +118,8 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: golang:1.14
|
image: golang:1.14
|
||||||
commands:
|
commands:
|
||||||
- go build -v -ldflags "-X main.version=${DRONE_TAG:-latest}" -a -tags netgo -o release/amd64/drone-github-comment ./cmd/drone-github-comment
|
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}"
|
||||||
|
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/amd64/drone-github-comment ./cmd/drone-github-comment
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
image: plugins/docker:18-linux-amd64
|
image: plugins/docker:18-linux-amd64
|
||||||
@ -194,7 +195,8 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: golang:1.14
|
image: golang:1.14
|
||||||
commands:
|
commands:
|
||||||
- go build -v -ldflags "-X main.version=${DRONE_TAG:-latest}" -a -tags netgo -o release/arm64/drone-github-comment ./cmd/drone-github-comment
|
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}"
|
||||||
|
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm64/drone-github-comment ./cmd/drone-github-comment
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
image: plugins/docker:18-linux-arm64
|
image: plugins/docker:18-linux-arm64
|
||||||
@ -270,7 +272,8 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: golang:1.14
|
image: golang:1.14
|
||||||
commands:
|
commands:
|
||||||
- go build -v -ldflags "-X main.version=${DRONE_TAG:-latest}" -a -tags netgo -o release/arm/drone-github-comment ./cmd/drone-github-comment
|
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}"
|
||||||
|
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm/drone-github-comment ./cmd/drone-github-comment
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
image: plugins/docker:18-linux-arm
|
image: plugins/docker:18-linux-arm
|
||||||
@ -429,6 +432,6 @@ depends_on:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 95c46cb9e02b2d4ac12e9048a2fbcfd24ec13a69675dbcd8dfce12791de6c9db
|
hmac: 82c6056ce45400d94af46bef439d8f22ffd8b2465a95818d433487311aa0d277
|
||||||
|
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user