mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:51:50 +00:00
This does a few changes: Build binary and VM separately, it was a dirty hack that they ran in the same BK job Upload the binary to a release directory for tagged releases Adjust the docs to encourage people to use tagged releases instead of latest I also manually uploaded the tagged releases for past releases back to 3.43.0
22 lines
917 B
Bash
Executable File
22 lines
917 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# This script publishes the executor binary.
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"/../../..
|
|
set -eu
|
|
|
|
# Copy uploaded binary to 'latest'.
|
|
# TODO: Revise this. latest should probably not exist at all.
|
|
if [ "${BUILDKITE_BRANCH}" = "main" ]; then
|
|
gsutil rm -rf gs://sourcegraph-artifacts/executor/latest || true
|
|
gsutil cp -r "gs://sourcegraph-artifacts/executor/$(git rev-parse HEAD)" gs://sourcegraph-artifacts/executor/latest
|
|
gsutil iam ch allUsers:objectViewer gs://sourcegraph-artifacts
|
|
fi
|
|
|
|
# If this is a tagged release, we want to create a directory for it.
|
|
if [ "${EXECUTOR_IS_TAGGED_RELEASE}" = "true" ]; then
|
|
gsutil rm -rf "gs://sourcegraph-artifacts/executor/${BUILDKITE_TAG}" || true
|
|
gsutil cp -r "gs://sourcegraph-artifacts/executor/$(git rev-parse HEAD)" "gs://sourcegraph-artifacts/executor/${BUILDKITE_TAG}"
|
|
gsutil iam ch allUsers:objectViewer gs://sourcegraph-artifacts
|
|
fi
|