ubnt-freifunk-map-api/.drone.jsonnet

27 lines
802 B
Plaintext
Raw Normal View History

2021-01-02 22:01:44 +00:00
local pipeline(arch, os) = {
2021-01-02 22:21:00 +00:00
kind: pipeline,
type: docker,
2021-01-02 22:20:26 +00:00
name: "build" + os + "/" + arch,
2021-01-02 22:01:44 +00:00
steps: [{
2021-01-02 22:20:26 +00:00
name: "compile " + os + "/" + arch,
2021-01-02 22:01:44 +00:00
image: "golang:1.15.6-alpine3.12",
environment: {
"GOOS": os,
"GOARCH": arch,
"CGO_ENABLED": "0",
},
commands: [
2021-01-02 22:20:26 +00:00
'go build -ldflags "-s -w -X main.version=${DRONE_TAG##v}" -trimpath -o release/' + os + "/" + arch + "/ubnt-freifunk-map-api .",
2021-01-02 22:01:44 +00:00
"tar -cvzf release/ubnt-freifunk-map-api_"+ os + "/" + arch + ".tar.gz -C release/" + os + "/" + arch + " ubnt-freifunk-map-api"
],
},
],
};
[
pipeline("linux", "amd64"),
2021-01-02 22:16:14 +00:00
pipeline("linux", "arm64"),
pipeline("darwin", "amd64"),
pipeline("darwin", "arm64"),
pipeline("windows", "amd64"),
pipeline("windows", "arm64"),
]