Teach build script to detect release candidates and properly format release id.
authorKonstantin Dmitriev <ksee.zelgadis@gmail.com>
Thu, 14 Oct 2010 13:38:23 +0000 (20:38 +0700)
committerKonstantin Dmitriev <ksee.zelgadis@gmail.com>
Thu, 14 Oct 2010 13:38:23 +0000 (20:38 +0700)
This change made to avoid RC -> Stable package upgrade problems.
See http://dooglus.rincevent.net/synfig/logs/2010/%23synfig-2010-06-01.log @16:33.

autobuild/synfigstudio-linux-build.sh

index 60fbe60..86f9b7b 100644 (file)
@@ -665,6 +665,14 @@ initialize()
                        fi
                        BREED=${BREED%_master}
                fi
+               if [[ ${VERSION##*-RC} != ${VERSION} ]]; then
+                       if [[ $BREED == 'master' ]]; then
+                               BREED=rc${VERSION##*-RC}
+                       else
+                               BREED=rc${VERSION##*-RC}.$BREED
+                       fi
+                       VERSION=${VERSION%%-*}
+               fi
                [[ $DEBUG == 1 ]] && BREED=${BREED}_debug
                REVISION=`git show --pretty=medium $SELECTEDREVISION | head -n 3 |tail -n 1 | sed 's/Date: *//' | sed 's/ +.*//'`
                REVISION=`date --date="${REVISION}" +%Y%m%d`