draft updating to a pre-release

pull/58/head
Simon Let 6 years ago
parent d92e07c073
commit d207deb7c2
  1. 5
      scripts/rawinstall.sh

@ -9,9 +9,14 @@ echo
echo "Looking for the latest release ..." echo "Looking for the latest release ..."
json=$(curl --silent "https://api.github.com/repos/curusarn/resh/releases/latest") json=$(curl --silent "https://api.github.com/repos/curusarn/resh/releases/latest")
# latest release
# not very robust but we don't want any dependencies to parse to JSON # not very robust but we don't want any dependencies to parse to JSON
tag=$(echo "$json" | grep '"tag_name":' | cut -d':' -f2 | tr -d ',' | cut -d'"' -f2) tag=$(echo "$json" | grep '"tag_name":' | cut -d':' -f2 | tr -d ',' | cut -d'"' -f2)
# latest release OR pre-release
# json=$(curl --silent "https://api.github.com/repos/curusarn/resh/releases")
# tag=$(echo "$json" | grep '"tag_name":' | cut -d':' -f2 | tr -d ',' | cut -d'"' -f2 | sort --version-sort --reverse | head -n 1)
if [ ${#tag} -lt 2 ]; then if [ ${#tag} -lt 2 ]; then
echo "ERROR: Couldn't determine the latest release! (extracted git tag is too short \"${tag}\")" echo "ERROR: Couldn't determine the latest release! (extracted git tag is too short \"${tag}\")"
exit 1 exit 1

Loading…
Cancel
Save