Add branch-only mode to force skipping tags

Setting TAG="" didn't work and isn't great UX anyway so
let's add -b to just set BRANCH_ONLY mode to match -t
for TAG_ONLY.

Change-Id: I4223504b4ec215376722037ecfab1416e1195f9f
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
Dean Troyer 2018-12-10 15:49:21 -06:00
parent 2a6eac3840
commit bc2db5f50c

View File

@ -6,6 +6,8 @@
# --dry-run|-n Do all work except pushing back to the remote repo.
# Useful to validate everything locally before pushing.
#
# -b Set branch only (sets TAG="")
#
# -l List the repo URLS that would be processed and exit
#
# -m <manifest> Extract the repo list from <manifest> for starlingx
@ -53,7 +55,7 @@ set -e
# Defaults
MANIFEST=""
optspec="lm:nt-:"
optspec="blm:nt-:"
while getopts "$optspec" o; do
case "${o}" in
# Hack in longopt support
@ -70,6 +72,9 @@ while getopts "$optspec" o; do
esac
;;
b)
BRANCH_ONLY=1
;;
l)
LIST=1
;;
@ -105,6 +110,11 @@ TAG=${TAG:-$SERIES.0}
# The list of remotes to extract from MANIFEST
REMOTES="starlingx stx-staging"
if [[ -n $BRANCH_ONLY ]]; then
# Force tag to be empty
TAG=""
fi
if [[ -n $TAG_ONLY ]]; then
# Force source and target branches to be the same
SRC_BRANCH=${BRANCH}