2019-04-04 13:54:51 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -u -e -x -o pipefail
|
|
|
|
|
2020-03-01 12:50:21 -08:00
|
|
|
go version | grep go1.14 || exit
|
2019-04-04 13:54:51 -07:00
|
|
|
|
2017-07-16 11:57:32 -07:00
|
|
|
VERSION=$(git describe --tags)
|
2017-07-16 12:05:29 -07:00
|
|
|
mkdir ci/binaries
|
2017-09-09 05:42:36 -07:00
|
|
|
GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o ci/binaries/matterbridge-$VERSION-windows-amd64.exe
|
|
|
|
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o ci/binaries/matterbridge-$VERSION-linux-amd64
|
2017-07-16 13:27:53 -07:00
|
|
|
GOOS=linux GOARCH=arm go build -ldflags "-s -w -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o ci/binaries/matterbridge-$VERSION-linux-arm
|
2017-09-09 05:42:36 -07:00
|
|
|
GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o ci/binaries/matterbridge-$VERSION-darwin-amd64
|
2017-07-16 11:57:32 -07:00
|
|
|
cd ci
|
|
|
|
cat > deploy.json <<EOF
|
|
|
|
{
|
|
|
|
"package": {
|
|
|
|
"name": "Matterbridge",
|
|
|
|
"repo": "nightly",
|
|
|
|
"subject": "42wim"
|
|
|
|
},
|
|
|
|
"version": {
|
2017-07-16 12:32:41 -07:00
|
|
|
"name": "$VERSION"
|
2017-07-16 11:57:32 -07:00
|
|
|
},
|
|
|
|
"files":
|
|
|
|
[
|
2017-07-16 13:15:06 -07:00
|
|
|
{"includePattern": "ci/binaries/(.*)", "uploadPattern":"\$1"}
|
2017-07-16 11:57:32 -07:00
|
|
|
],
|
|
|
|
"publish": true
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|