2017-07-16 18:57:32 +00:00
|
|
|
#!/bin/bash
|
2017-07-16 19:32:41 +00:00
|
|
|
go version |grep go1.8 || exit
|
2017-07-16 18:57:32 +00:00
|
|
|
VERSION=$(git describe --tags)
|
2017-07-16 19:05:29 +00:00
|
|
|
mkdir ci/binaries
|
2017-07-16 19:32:41 +00:00
|
|
|
GOOS=windows GOARCH=amd64 go build -x -ldflags "-s -w -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o ci/binaries/matterbridge-$VERSION-win64.exe
|
|
|
|
GOOS=linux GOARCH=amd64 go build -x -ldflags "-s -w -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o ci/binaries/matterbridge-$VERSION-linux64
|
|
|
|
GOOS=linux GOARCH=arm go build -x -ldflags "-s -w -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o ci/binaries/matterbridge-$VERSION-linux-arm
|
2017-07-16 18:57:32 +00:00
|
|
|
cd ci
|
|
|
|
cat > deploy.json <<EOF
|
|
|
|
{
|
|
|
|
"package": {
|
|
|
|
"name": "Matterbridge",
|
|
|
|
"repo": "nightly",
|
|
|
|
"subject": "42wim"
|
|
|
|
},
|
|
|
|
"version": {
|
2017-07-16 19:32:41 +00:00
|
|
|
"name": "$VERSION"
|
2017-07-16 18:57:32 +00:00
|
|
|
},
|
|
|
|
"files":
|
|
|
|
[
|
2017-07-16 20:15:06 +00:00
|
|
|
{"includePattern": "ci/binaries/(.*)", "uploadPattern":"\$1"}
|
2017-07-16 18:57:32 +00:00
|
|
|
],
|
|
|
|
"publish": true
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|