ubnt-freifunk-map-api/.drone.jsonnet
Nils Jakobi 95dbf2a1bb
Some checks failed
continuous-integration/drone/push Build is failing
we also have spaces
2021-01-02 23:35:29 +01:00

26 lines
789 B
Plaintext

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