summaryrefslogtreecommitdiff
path: root/scripts/publish-macosx.sh
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-03-28 03:55:51 (GMT)
committerMarius Kintel <marius@kintel.net>2013-03-28 03:55:51 (GMT)
commiteefcd6d0b271642d470cd55bc47d1579d943938e (patch)
tree48f9e4db455879025adb9317b740bfa4b72c2d66 /scripts/publish-macosx.sh
parentf70578f362c8c2c78036c9de846c20802ac7aa81 (diff)
parentbeff2b1f4811b7f9d2b58bfc6a469a363bc9bfd0 (diff)
Merge branch 'master' into epec-kernel
Conflicts: src/PolySetCGALEvaluator.cc
Diffstat (limited to 'scripts/publish-macosx.sh')
-rwxr-xr-xscripts/publish-macosx.sh23
1 files changed, 20 insertions, 3 deletions
diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh
index e22e5bd..3aeeaf9 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
@@ -29,10 +32,24 @@ if [[ $? != 0 ]]; then
exit 1
fi
+SIGNATURE=$(openssl dgst -sha1 -binary < OpenSCAD-$VERSION.dmg | openssl dgst -dss1 -sign dsa_priv.pem | openssl enc -base64)
+
+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,@DSASIGNATURE@,$SIGNATURE,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
-# Update snapshot filename on wab page
+# Update snapshot filename on web page
`dirname $0`/update-web.sh OpenSCAD-$VERSION.dmg
contact: Jan Huwald // Impressum