src-expose: Release script

This commit is contained in:
Keegan Carruthers-Smith 2019-10-09 23:01:56 +02:00
parent e45bd47f8c
commit 1cd6e1c4ea
2 changed files with 20 additions and 0 deletions

1
dev/src-expose/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
artifacts

19
dev/src-expose/release.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
set -e
mkdir -p artifacts && cd artifacts
mkdir -p "src-expose/$(git rev-parse HEAD)"
cd "src-expose/$(git rev-parse HEAD)"
echo "src-expose built from https://github.com/sourcegraph/sourcegraph" > info.txt
echo >> info.txt
git log -n1 >> info.txt
mkdir linux-amd64 darwin-amd64
CGO_ENABLED=0 GOOS=linux go build -o linux-amd64/src-expose github.com/sourcegraph/sourcegraph/dev/src-expose
CGO_ENABLED=0 GOOS=darwin go build -o darwin-amd64/src-expose github.com/sourcegraph/sourcegraph/dev/src-expose
cd -
rm -rf src-expose/latest
cp -r "src-expose/$(git rev-parse HEAD)" src-expose/latest
gsutil cp -r src-expose gs://sourcegraph-artifacts
gsutil iam ch allUsers:objectViewer gs://sourcegraph-artifacts