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