Use cross-platform packaging version script in MinGW build
authorTim Mayberry <mojofunk@gmail.com>
Fri, 19 Jul 2013 08:35:42 +0000 (18:35 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Mon, 22 Jul 2013 03:41:14 +0000 (13:41 +1000)
tools/windows_packaging/mingw-env.sh

index 37a575885f97bab8ae0bf2dd5c67a0e26454a205..28e5bf5fd34eae14e37b4b24fa060798b5ee40db 100755 (executable)
@@ -26,8 +26,9 @@ BUILD_DIR=$BASE/build
 BUILD_CACHE_FILE=$BUILD_DIR/c4che/_cache.py
 TOOLS_DIR=$BASE/tools/windows_packaging
 
+. ../define_versions.sh
+
 APPNAME=`grep -m 1 '^APPNAME' $BASE/wscript | awk '{print $3}' | sed "s/'//g"`
-VERSION=`grep -m 1 '^VERSION' $BASE/wscript | awk '{print $3}' | sed "s/'//g"`
 
 # These are only relevant after a build
 if test -f $BUILD_CACHE_FILE
@@ -35,9 +36,9 @@ then
        # Figure out the Build Type
        if grep -q "DEBUG = True" $BUILD_CACHE_FILE; then
                DEBUG=1
-               PACKAGE_DIR="$APPNAME-$VERSION-win32-dbg"
+               PACKAGE_DIR="$APPNAME-${version}-win32-dbg"
        else
-               PACKAGE_DIR="$APPNAME-$VERSION-win32"
+               PACKAGE_DIR="$APPNAME-${version}-win32"
        fi
 
        if grep -q "BUILD_TESTS = True" $BUILD_CACHE_FILE; then