aboutsummaryrefslogtreecommitdiff
path: root/scripts/git/git-list-tor-branches.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/git/git-list-tor-branches.sh')
-rwxr-xr-xscripts/git/git-list-tor-branches.sh23
1 files changed, 15 insertions, 8 deletions
diff --git a/scripts/git/git-list-tor-branches.sh b/scripts/git/git-list-tor-branches.sh
index 2bcd4722b4..29e91dd1b6 100755
--- a/scripts/git/git-list-tor-branches.sh
+++ b/scripts/git/git-list-tor-branches.sh
@@ -8,7 +8,7 @@ SCRIPT_NAME=$(basename "$0")
function usage()
{
- echo "$SCRIPT_NAME [-h] [-l|-s|-b|-m] [-R]"
+ echo "$SCRIPT_NAME [-h] [-l|-s|-b|-m] [-R|-M]"
echo
echo " arguments:"
echo " -h: show this help text"
@@ -20,6 +20,7 @@ function usage()
echo " ( branch parent path suffix parent_suffix ) arrays"
echo
echo " -R: omit release branches."
+ echo " -M: omit maint branches."
}
# list : just a list of branch names.
@@ -27,9 +28,10 @@ function usage()
# suffix: write a list of suffixes.
# merge: branch, upstream, path, suffix, upstream suffix.
mode="list"
+skip_maint_branches="no"
skip_release_branches="no"
-while getopts "hblmsR" opt ; do
+while getopts "hblmsRM" opt ; do
case "$opt" in
h) usage
exit 0
@@ -42,6 +44,8 @@ while getopts "hblmsR" opt ; do
;;
m) mode="merge"
;;
+ M) skip_maint_branches="yes"
+ ;;
R) skip_release_branches="yes"
;;
*) echo "Unknown option"
@@ -73,13 +77,16 @@ branch() {
# location: where the branch can be found.
- if [[ "$brname" == "master" ]]; then
- suffix="_master"
+ if [[ "$brname" == "main" ]]; then
+ suffix="_main"
location="\$GIT_PATH/\$TOR_MASTER_NAME"
elif [[ "$brname" =~ ^maint- ]]; then
suffix="_${brname_nodots#maint-}"
location="\$GIT_PATH/\$TOR_WKT_NAME/$brname"
is_maint="yes"
+ if [[ "$skip_maint_branches" = "yes" ]]; then
+ return
+ fi
elif [[ "$brname" =~ ^release- ]]; then
suffix="_r${brname_nodots#release-}"
location="\$GIT_PATH/\$TOR_WKT_NAME/$brname"
@@ -139,12 +146,12 @@ finish() {
branch maint-0.3.5
branch release-0.3.5
-branch maint-0.4.4
-branch release-0.4.4
-
branch maint-0.4.5
branch release-0.4.5
-branch master
+branch maint-0.4.6
+branch release-0.4.6
+
+branch main
finish