Files
coder/scripts/should_deploy.sh
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
738 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# This script determines if the current branch should be deployed to dogfood.
#
# To avoid masking unrelated failures, this script will return 0 in either case,
# and will print `DEPLOY` or `NOOP` to stdout.
set -euo pipefail
# shellcheck source=scripts/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
cdroot
branch_name=$(git branch --show-current)
2026-02-27 16:32:10 +00:00
# We no longer deploy release branches to dogfood, and instead test them on the
# stable deployment.
# TODO: once we're happy with the new deployment process, we can remove this
# script and the related GitHub workflow.
if [[ "$branch_name" == "main" ]]; then
log "VERDICT: DEPLOY"
echo "DEPLOY" # stdout
else
log "VERDICT: NOOP"
echo "NOOP" # stdout
fi