deploy-collab
 1#!/usr/bin/env bash
 2
 3set -eu
 4source script/lib/deploy-helpers.sh
 5
 6if [[ $# != 1 ]]; then
 7  echo "Usage: $0 <production|staging>"
 8  exit 1
 9fi
10environment=$1
11tag="$(tag_for_environment $environment)"
12
13branch=$(git rev-parse --abbrev-ref HEAD)
14if [ "$branch" != "main" ]; then
15  echo "You must be on main to run this script"
16  exit 1
17fi
18
19git pull --ff-only origin main
20git tag -f $tag
21git push -f origin $tag