summaryrefslogtreecommitdiff
path: root/scripts/publish-macosx.sh
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-02-05 05:36:25 (GMT)
committerMarius Kintel <marius@kintel.net>2013-02-05 05:36:25 (GMT)
commitfa00547507566a646db2baffea114104b1ffd567 (patch)
tree85d8d3e09c9b4c1f651829042e20b061166ea415 /scripts/publish-macosx.sh
parent03be37d16b585e64de87118053206aaae06e7cf8 (diff)
First version of automatic updates for Mac
Diffstat (limited to 'scripts/publish-macosx.sh')
-rwxr-xr-xscripts/publish-macosx.sh41
1 files changed, 28 insertions, 13 deletions
diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh
index e22e5bd..f9c693b 100755
--- a/scripts/publish-macosx.sh
+++ b/scripts/publish-macosx.sh
@@ -1,10 +1,13 @@
#!/bin/sh
-# NB! To build a release build, the VERSION environment variable needs to be set.
+# NB! To build a release build, the VERSION and VERSIONDATE environment variables needs to be set.
# See doc/release-checklist.txt
+if test -z "$VERSIONDATE"; then
+ VERSIONDATE=`date "+%Y.%m.%d"`
+fi
if test -z "$VERSION"; then
- VERSION=`date "+%Y.%m.%d"`
+ VERSION=$VERSIONDATE
COMMIT=-c
SNAPSHOT=true
fi
@@ -18,21 +21,33 @@ export OPENSCAD_LIBRARIES=$PWD/../libraries/install
# Make sure that the correct Qt tools are used
export PATH=$OPENSCAD_LIBRARIES/bin:$PATH
-`dirname $0`/release-common.sh -v $VERSION $COMMIT
-if [[ $? != 0 ]]; then
- exit 1
-fi
+#`dirname $0`/release-common.sh -v $VERSION $COMMIT
+#if [[ $? != 0 ]]; then
+# exit 1
+#fi
echo "Sanity check of the app bundle..."
-`dirname $0`/macosx-sanity-check.py OpenSCAD.app/Contents/MacOS/OpenSCAD
-if [[ $? != 0 ]]; then
- exit 1
+#`dirname $0`/macosx-sanity-check.py OpenSCAD.app/Contents/MacOS/OpenSCAD
+#if [[ $? != 0 ]]; then
+# exit 1
+#fi
+
+if [[ $VERSION == $VERSIONDATE ]]; then
+ APPCASTFILE=appcast-snapshots.xml
+else
+ APPCASTFILE=appcast.xml
+fi
+echo "Creating appcast $APPCASTFILE..."
+sed -e "s,@VERSION@,$VERSION,g" -e "s,@VERSIONDATE@,$VERSIONDATE,g" -e "s,@FILESIZE@,$(stat -f "%z" OpenSCAD-$VERSION.dmg),g" $APPCASTFILE.in > $APPCASTFILE
+cp $APPCASTFILE ../openscad.github.com
+if [[ $VERSION == $VERSIONDATE ]]; then
+ cp $APPCASTFILE ../openscad.github.com/appcast-snapshots.xml
fi
echo "Uploading..."
-LABELS=OpSys-OSX,Type-Executable
-if ! $SNAPSHOT; then LABELS=$LABELS,Featured; fi
-`dirname $0`/googlecode_upload.py -s 'Mac OS X Snapshot' -p openscad OpenSCAD-$VERSION.dmg -l $LABELS
+#LABELS=OpSys-OSX,Type-Executable
+#if ! $SNAPSHOT; then LABELS=$LABELS,Featured; fi
+#`dirname $0`/googlecode_upload.py -s 'Mac OS X Snapshot' -p openscad OpenSCAD-$VERSION.dmg -l $LABELS
# Update snapshot filename on wab page
-`dirname $0`/update-web.sh OpenSCAD-$VERSION.dmg
+#`dirname $0`/update-web.sh OpenSCAD-$VERSION.dmg
contact: Jan Huwald // Impressum