util/tagbranch: Update for COIL
The primary branch name has changed, so update the script to reflect
that.
BRANCH=none
TEST=none
# - the remote git server name shows up in 'git config -l' output in the
# line starting with "remote.cros.url="
# - firmware branch names have format of firmware-<board>-XXXXXX
-# - the current branch was cut off of <remote name>/master
+# - the current branch was cut off of <remote name>/main
#
# The tag name generated by this script would be the XXXXX string with dots,
# if any, replaced by underscores.
@@ -44,10 +44,10 @@ fi
export ORIGIN_NAME="cros"
ORIGIN="$(git config "remote.${ORIGIN_NAME}.url")"
-# The last common patch between this branch and the master.
-BRANCH_POINT="$(git merge-base "${UPSTREAM}" "${ORIGIN_NAME}/master")"
+# The last common patch between this branch and main.
+BRANCH_POINT="$(git merge-base "${UPSTREAM}" "${ORIGIN_NAME}/main")"
if [[ -z "${BRANCH_POINT}" ]]; then
- echo "Failed to determine cros/master branch point" >&2
+ echo "Failed to determine cros/main branch point" >&2
exit 1
fi
@@ -56,8 +56,8 @@ TAG_BASE="$(sed 's/.*-// # drop everything up to including the last -
s/\./_/g # replace dots and dashes with underscores
' <<< "${UPSTREAM}" )"
-if [[ "${TAG_BASE}" == "master" ]]; then
- echo "Nothing to tag in master branch" >&2
+if [[ "${TAG_BASE}" == "main" ]]; then
+ echo "Nothing to tag in main branch" >&2
exit 1
fi
