the refreshInstance.sh script's "install-release" option now defaults to the newest build-* release

This commit is contained in:
Axel Uhl
2019-01-24 22:35:48 +01:00
parent b7b934037d
commit 4289557e5a
2 changed files with 3 additions and 7 deletions
+1 -5
View File
@@ -2,11 +2,7 @@
release=$1
if [ "$release" = "" ]; then
SET_LATEST=1
INDEX=`mktemp index_XXXX.html`
echo Tempfile for index.html is $INDEX
wget -O $INDEX http://releases.sapsailing.com/
release=$(cat $INDEX | grep build- | tail -1 | sed -e 's/^.*\(build-[0-9]*\).*$/\1/')
rm $INDEX
release=$(wget -O - http://releases.sapsailing.com/ 2>/dev/null | grep build- | tail -1 | sed -e 's/^.*\(build-[0-9]*\).*$/\1/')
echo Latest release is $release
fi
GITROOT="`dirname $0`/.."
+2 -2
View File
@@ -288,8 +288,8 @@ if [[ $OPERATION == "auto-install" ]]; then
elif [[ $OPERATION == "install-release" ]]; then
INSTALL_FROM_RELEASE=$PARAM
if [[ $INSTALL_FROM_RELEASE == "" ]]; then
echo "You need to provide the name of a release from http://releases.sapsailing.com/"
exit 1
INSTALL_FROM_RELEASE=$(wget -O - http://releases.sapsailing.com/ 2>/dev/null | grep build- | tail -1 | sed -e 's/^.*\(build-[0-9]*\).*$/\1/')
echo "You didn't provide a release. Picking latest master build from http://releases.sapsailing.com/$INSTALL_FROM_RELEASE"
fi
# Honor the no-overrite setting if there is one