summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/publish-macosx.sh41
-rwxr-xr-xscripts/release-common.sh17
2 files changed, 40 insertions, 18 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
diff --git a/scripts/release-common.sh b/scripts/release-common.sh
index de14cb1..a30d43a 100755
--- a/scripts/release-common.sh
+++ b/scripts/release-common.sh
@@ -9,10 +9,12 @@
#
# Usage: release-common.sh [-v <versionstring>] [-c] [-x32]
# -v Version string (e.g. -v 2010.01)
+# -d Version date (e.g. -d 2010.01.23)
# -c Build with commit info
# -mingw32 Cross-compile for win32 using MXE
#
-# If no version string is given, todays date will be used (YYYY-MM-DD)
+# If no version string or version date is given, todays date will be used (YYYY-MM-DD)
+# If only verion date is given, it will be used also as version string.
# If no make target is given, release will be used on Windows, none one Mac OS X
#
# The commit info will extracted from git and be passed to qmake as OPENSCAD_COMMIT
@@ -23,7 +25,7 @@
printUsage()
{
- echo "Usage: $0 -v <versionstring> -c -mingw32
+ echo "Usage: $0 -v <versionstring> -d <versiondate> -c -mingw32
echo
echo " Example: $0 -v 2010.01
}
@@ -59,16 +61,20 @@ else
exit
fi
-while getopts 'v:c' c
+while getopts 'v:d:c' c
do
case $c in
v) VERSION=$OPTARG;;
+ d) VERSIONDATE=$OPTARG;;
c) OPENSCAD_COMMIT=`git log -1 --pretty=format:"%h"`
esac
done
+if test -z "$VERSIONDATE"; then
+ VERSIONDATE=`date "+%Y.%m.%d"`
+fi
if test -z "$VERSION"; then
- VERSION=`date "+%Y.%m.%d"`
+ VERSION=$VERSIONDATE
fi
@@ -102,7 +108,7 @@ if [ -d .git ]; then
git submodule update
fi
-echo "Building openscad-$VERSION $CONFIGURATION..."
+echo "Building openscad-$VERSION ($VERSIONDATE) $CONFIGURATION..."
case $OS in
LINUX|MACOSX)
@@ -230,6 +236,7 @@ echo "Creating archive.."
case $OS in
MACOSX)
+ /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $VERSIONDATE" OpenSCAD.app/Contents/Info.plist
macdeployqt OpenSCAD.app -dmg -no-strip
mv OpenSCAD.dmg OpenSCAD-$VERSION.dmg
hdiutil internet-enable -yes -quiet OpenSCAD-$VERSION.dmg
contact: Jan Huwald // Impressum