publish_new_release.sh: use debian packaged xq tool
This commit is contained in:
parent
c620a491ce
commit
420b2f4f01
1 changed files with 8 additions and 3 deletions
|
@ -4,9 +4,14 @@ ROOT_DIR=$( dirname $( realpath $0 ) )
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
LATEST="$1"
|
||||||
|
|
||||||
|
if [ -z "$LATEST" ]
|
||||||
|
then
|
||||||
echo -n "Getting latest release..."
|
echo -n "Getting latest release..."
|
||||||
LATEST=$( curl --silent https://forgejo.org/releases/rss.xml|xq '.rss.channel.item[0].title'|tr -d '"'|sed 's/^v//' )
|
LATEST=$( curl --silent https://forgejo.org/releases/rss.xml|xq -x '/rss/channel/item[1]/title'|sed 's/^v//' )
|
||||||
echo done.
|
echo done.
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Latest release: $LATEST"
|
echo "Latest release: $LATEST"
|
||||||
[ -n "$( git tag -l "$LATEST" )" ] && echo "Release $LATEST already exists" && exit 1
|
[ -n "$( git tag -l "$LATEST" )" ] && echo "Release $LATEST already exists" && exit 1
|
||||||
|
|
Loading…
Reference in a new issue