Skip to content

Commit

Permalink
OSX package: Create .zip rather than .dmg.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Dec 8, 2013
1 parent 8e255fa commit fcc94c7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions github-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ read -s -p "Token (https://github.com/settings/applications): " TOKEN
curl -H "Authorization: token $TOKEN" \
-H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/x-apple-diskimage" \
--data-binary @$FULLNAME.dmg \
"https://uploads.github.com/repos/jgm/pandoc/releases/$VERSION/assets?name=$FULLNAME.dmg"
--data-binary @$FULLNAME.pkg.zip \
"https://uploads.github.com/repos/jgm/pandoc/releases/$VERSION/assets?name=$FULLNAME.pkg.zip"

curl -H "Authorization: token $TOKEN" \
-H "Accept: application/vnd.github.manifold-preview" \
Expand Down
2 changes: 1 addition & 1 deletion googlecode-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
VERSION=$1
googlecode_upload.py -s "Source tarball" -p pandoc -u fiddlosopher --labels=Featured,Type-Source,OpSys-All dist/pandoc-$VERSION.tar.gz
googlecode_upload.py -s "Windows installer" -p pandoc -u fiddlosopher --labels=Featured,Type-Installer,OpSys-Windows pandoc-$VERSION.msi
googlecode_upload.py -s "Mac OS X installer" -p pandoc -u fiddlosopher --labels=Featured,Type-Installer,OpSys-OSX pandoc-$VERSION.dmg
googlecode_upload.py -s "Mac OS X installer" -p pandoc -u fiddlosopher --labels=Featured,Type-Installer,OpSys-OSX pandoc-$VERSION.pkg.zip
21 changes: 14 additions & 7 deletions make_osx_package.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -e
#!/bin/bash -e

DIST=`pwd`/osx_package
SANDBOX=`pwd`/.cabal-sandbox
Expand All @@ -13,6 +13,9 @@ CODESIGNID="Developer ID Application: John Macfarlane"
PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
EXES="pandoc pandoc-citeproc biblio2yaml"

read -s -p "sudo password: " PASSWORD
echo $PASSWORD | sudo -S echo "Password valid, continuing."

echo Removing old files...
rm -rf $DIST
mkdir -p $RESOURCES
Expand Down Expand Up @@ -50,6 +53,8 @@ codesign --force --sign "$CODESIGNID" $DEST/bin/pandoc
spctl --assess --type execute $DEST/bin/pandoc

echo Creating OSX package...
# remove old package first
echo $PASSWORD | sudo -S rm -rf $BASE.pkg $BASE.dmg

sudo $PACKAGEMAKER \
--root $ROOT \
Expand All @@ -67,11 +72,13 @@ sudo codesign --force --sign "$CODESIGNID" $BASE.pkg
# make sure it's valid...
spctl --assess --type install $BASE.pkg

echo Creating disk image...
echo Creating zip...
zip -9 -r $BASE.pkg.zip $BASE.pkg

sudo hdiutil create "$BASE.dmg" \
-format UDZO -ov \
-volname "pandoc $VERSION" \
-srcfolder $BASE.pkg
sudo hdiutil internet-enable "$BASE.dmg"
# echo Creating disk image...
# sudo hdiutil create "$BASE.dmg" \
# -format UDZO -ov \
# -volname "pandoc $VERSION" \
# -srcfolder $BASE.pkg
# sudo hdiutil internet-enable "$BASE.dmg"

0 comments on commit fcc94c7

Please sign in to comment.