diff --git a/seqs/roundcube.sh b/seqs/roundcube.sh index 955616b..c4ce0fe 100755 --- a/seqs/roundcube.sh +++ b/seqs/roundcube.sh @@ -43,10 +43,23 @@ step_20() { exe tar czf "$wwwBackup" $(basename "$RC_LOC") } -step_22_info() { echo "Upgrade installation to latest version from github"; } +step_22_info() { + shift + if [ -z $1 ] ; then + echo "Upgrade installation to latest version from github [CUSTOM VERSION]" + else + echo "Upgrade installation to $1 from github" + fi +} step_22_alias() { ALIAS="upgrade"; } step_22() { - local latestVersion=$(curl --silent "$latestUrl" | grep -Po '"tag_name": "\K.*?(?=")') + shift # don't need step number + local latestVersion= + if [ ! -z $1 ] ; then + latestVersion="$1" + else + latestVersion=$(curl --silent "$latestUrl" | grep -Po '"tag_name": "\K.*?(?=")') + fi if [ -z $latestVersion ] ; then echoerr " [E] Cannot determine latest version from github repository" @@ -88,12 +101,18 @@ step_22() { step backup echo " [I] Installing version $latestVersion to $RC_LOC" exe "$tempInstall" "$RC_LOC" - exe cd "$RC_LOC" - echo " [I] Starting post update procedure" - exe php composer.phar update --no-dev + echo " [I] Make sure to check composer.json-dist file for upstream changes" } tempDown="/tmp/roundcube" tempLoc="$tempDown/rc.tar.gz" +step_23_info() { echo "Post upgrade procedure"; } +step_23_alias() { ALIAS="postupgrade"; } +step_23() { + exe cd "$RC_LOC" + echo " [I] Starting post update procedure" + exe php composer.phar update --no-dev +} + VERSION_SEQREV=10 . /usr/local/bin/sequencer.sh