Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions _scripts/trigger-dot-release.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#! /bin/bash
#
# Tag a patch release on the current train branch and push it to origin.
# Tag a patch release on the current train branch and push it to a remote. Defaults to 'origin'.
# Pushing the tag is what kicks off the docker.yml build via
# `yarn trigger:docker-push <tag>`.
#
# Usage:
# ./_scripts/trigger-dot-release.sh <tag>
# FXA_REMOTE=<remote> ./_scripts/trigger-dot-release.sh <tag>
#
# Environment variables:
# FXA_REMOTE Git remote to fetch/push against (default: origin).
#
# Examples:
# ./_scripts/trigger-dot-release.sh v1.100.5
# ./_scripts/trigger-dot-release.sh v1.100.0-rc1
# FXA_REMOTE=upstream ./_scripts/trigger-dot-release.sh v1.100.5
#
# Pre-flight checklist (run yourself before invoking):
# - Patch has been merged into the train branch locally
Expand All @@ -20,7 +25,8 @@ set -euo pipefail
tag="${1:-}"

if [[ -z "${tag}" ]]; then
echo "Usage: ${0} <tag>" >&2
echo "Usage: [FXA_REMOTE=<remote>] ${0} <tag>" >&2
echo " FXA_REMOTE Git remote to fetch/push against (default: origin)." >&2
exit 1
fi

Expand All @@ -31,7 +37,7 @@ fi

minor="${BASH_REMATCH[2]}"
branch="train-${minor}"
remote="origin"
remote="${FXA_REMOTE:-origin}"

echo "Fetching latest tags from ${remote}..."
Comment on lines 38 to 42
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, will do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think there's a small chance someone has REMOTE set to something random in their env, just cause its such a ubiquitous term... So maybe GIT_FXA_REMOTE would be less likely to collide?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, will update! Though I think FXA_REMOTE should be OK.

git fetch "${remote}" --tags
Expand Down