Alter foprmat for list and a small fix for make-release

This commit is contained in:
Brian Read 2023-07-20 15:42:16 +01:00
parent 029b3fe3cd
commit 99be082770
2 changed files with 13 additions and 6 deletions

View File

@ -8,7 +8,7 @@ if [ ! -e $inifilename ] ; then
# Not here, look at system default # Not here, look at system default
if [ ! -e /etc/smegit.ini ] ; then if [ ! -e /etc/smegit.ini ] ; then
echo "No ini file found $inifilename or /etc/smegit.ini" echo "No ini file found $inifilename or /etc/smegit.ini"
echo "git-list-all-org-repos.sh <organisation> [draftrelease | prerelease | release] [cloneurl] [zipurl]" echo "git-list-all-org-repos.sh <organisation> [draftrelease | prerelease | release | allreleases] [cloneurl] [zipurl]"
exit 1 exit 1
else else
inifilename="/etc/smegit.ini" inifilename="/etc/smegit.ini"
@ -71,7 +71,7 @@ for param in $2 $3 $4 $5 $6 $7 $8 $9 $10; do
done done
if [[ -z $1 ]] ; then if [[ -z $1 ]] ; then
echo "git-list-all-org-repos.sh <organisation> [draftrelease | prerelease | release] [cloneurl] [zipurl]" echo "git-list-all-org-repos.sh <organisation> [draftrelease | prerelease | release | allreleases] [cloneurl] [zipurl]"
exit 0 exit 0
fi 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. # Will need to use " jq 'map(.name)'" once we have more than one release.
REL=$(echo $RESPONSE | jq -r '.[0].tag_name') REL=$(echo $RESPONSE | jq -r '.[0].tag_name')
ID=$(echo $RESPONSE | jq -r '.[0].id') 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 [ $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 else line="$line\tnone";fi
if [ $SHOWCLONEURL ] ; then if [ $SHOWCLONEURL ] ; then
URL=$(echo $RESPONSE | jq -r '.[0].url') URL=$(echo $RESPONSE | jq -r '.[0].url')
if [ "$URL" ] ; then line="$line\t$URL"; fi if [ "$URL" ] ; then line="$line $URL"; fi
fi fi
if [ $SHOWZIPURL ] ; then if [ $SHOWZIPURL ] ; then
URL=$(echo $RESPONSE | jq -r '.[0].zipball_url') 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 fi
fi fi

View File

@ -234,7 +234,7 @@ for File in $(ls $RPMDIR/*.rpm) ; do
echo "Delete failed $BASEFile from $2/$1 $3 ($ID) release ($RESPONSE)" echo "Delete failed $BASEFile from $2/$1 $3 ($ID) release ($RESPONSE)"
fi fi
else else
echo "Did not find $BASEFile in \"$NAMES\"" if [ $DEBUG ]; then echo "Did not find $BASEFile in \"$NAMES\""; fi
fi fi
# Then send current version # Then send current version
FULLFILENAME=$FULLPATH/$File FULLFILENAME=$FULLPATH/$File