Files

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

22 lines
406 B
Bash
Raw Permalink Normal View History

2025-03-10 01:06:11 -07:00
#!/usr/bin/env bash
2021-07-12 14:14:39 -06:00
set -eu
2022-10-21 13:15:34 -07:00
source script/lib/deploy-helpers.sh
2021-07-12 14:14:39 -06:00
2024-02-01 11:54:49 -07:00
if [[ $# != 1 ]]; then
echo "Usage: $0 <production|staging>"
exit 1
fi
2022-10-21 15:50:14 -07:00
environment=$1
2024-02-01 11:54:49 -07:00
tag="$(tag_for_environment $environment)"
2022-10-21 15:50:14 -07:00
2024-02-01 11:54:49 -07:00
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" != "main" ]; then
echo "You must be on main to run this script"
exit 1
fi
2022-10-21 15:50:14 -07:00
2024-02-01 11:57:09 -07:00
git pull --ff-only origin main
git tag -f $tag
git push -f origin $tag