From 99be0827705491b07b5a760fb4be8d4613e86a14 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Thu, 20 Jul 2023 15:42:16 +0100 Subject: [PATCH] Alter foprmat for list and a small fix for make-release --- git-list-all-org-repos.sh | 17 ++++++++++++----- git-make-release.sh | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/git-list-all-org-repos.sh b/git-list-all-org-repos.sh index 51fd264..f7addd1 100755 --- a/git-list-all-org-repos.sh +++ b/git-list-all-org-repos.sh @@ -8,7 +8,7 @@ if [ ! -e $inifilename ] ; then # Not here, look at system default if [ ! -e /etc/smegit.ini ] ; then echo "No ini file found $inifilename or /etc/smegit.ini" - echo "git-list-all-org-repos.sh [draftrelease | prerelease | release] [cloneurl] [zipurl]" + echo "git-list-all-org-repos.sh [draftrelease | prerelease | release | allreleases] [cloneurl] [zipurl]" exit 1 else inifilename="/etc/smegit.ini" @@ -71,7 +71,7 @@ for param in $2 $3 $4 $5 $6 $7 $8 $9 $10; do done if [[ -z $1 ]] ; then - echo "git-list-all-org-repos.sh [draftrelease | prerelease | release] [cloneurl] [zipurl]" + echo "git-list-all-org-repos.sh [draftrelease | prerelease | release | allreleases] [cloneurl] [zipurl]" exit 0 fi @@ -111,16 +111,23 @@ for item in $REPO_LIST ; do # Will need to use " jq 'map(.name)'" once we have more than one release. REL=$(echo $RESPONSE | jq -r '.[0].tag_name') ID=$(echo $RESPONSE | jq -r '.[0].id') + PRE=$(echo $RESPONSE | jq -r '.[0].prerelease') + DRAFT=$(echo $RESPONSE | jq -r '.[0].draft') + if [ $PRE = "true" ] ; then PRE="pre"; + else PRE=""; fi + if [ $DRAFT = "true" ] ; then DRAFT="draft"; + else DRAFT=""; fi + if [ $DEBUG ] ; then echo "pre:$PRE Draft:$DRAFT"; fi if [ $DEBUG ] ; then echo $REL; fi - if [ "$REL" ] ; then line="$line\t\t\t$REL($ID)"; + if [ "$REL" ] ; then line="$line $REL $ID $PRE $DRAFT"; else line="$line\tnone";fi if [ $SHOWCLONEURL ] ; then URL=$(echo $RESPONSE | jq -r '.[0].url') - if [ "$URL" ] ; then line="$line\t$URL"; fi + if [ "$URL" ] ; then line="$line $URL"; fi fi if [ $SHOWZIPURL ] ; then URL=$(echo $RESPONSE | jq -r '.[0].zipball_url') - if [ "$URL" ] ; then line="$line\t$URL"; fi + if [ "$URL" ] ; then line="$line $URL"; fi fi fi fi diff --git a/git-make-release.sh b/git-make-release.sh index 5e292f1..8003020 100755 --- a/git-make-release.sh +++ b/git-make-release.sh @@ -234,7 +234,7 @@ for File in $(ls $RPMDIR/*.rpm) ; do echo "Delete failed $BASEFile from $2/$1 $3 ($ID) release ($RESPONSE)" fi else - echo "Did not find $BASEFile in \"$NAMES\"" + if [ $DEBUG ]; then echo "Did not find $BASEFile in \"$NAMES\""; fi fi # Then send current version FULLFILENAME=$FULLPATH/$File