From ce35b23487c5a9e2459bd33e4b9442849ee9f614 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 1 Dec 2013 10:30:44 -0800 Subject: Added github-upload.sh. --- github-upload.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 github-upload.sh (limited to 'github-upload.sh') diff --git a/github-upload.sh b/github-upload.sh new file mode 100644 index 000000000..2a5f6534d --- /dev/null +++ b/github-upload.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash + +VERSION=$1 +FULLNAME=pandoc-$VERSION +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/$FULLNAME/assets?name=$FULLNAME.dmg" + +curl -H "Authorization: token $TOKEN" \ + -H "Accept: application/vnd.github.manifold-preview" \ + -H "Content-Type: application/x-msi" \ + --data-binary @$FULLNAME.msi \ + "https://uploads.github.com/repos/jgm/pandoc/releases/$FULLNAME/assets?name=$FULLNAME.msi" + -- cgit v1.2.3 From 4f64a4bc3bbd7e976635bcf5752633895a5aa3d8 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 7 Dec 2013 12:59:08 -0800 Subject: More changes to github-upload.sh. Still doesn't work, though. --- github-upload.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 github-upload.sh (limited to 'github-upload.sh') diff --git a/github-upload.sh b/github-upload.sh old mode 100644 new mode 100755 index 2a5f6534d..51000ae1d --- a/github-upload.sh +++ b/github-upload.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/bin/bash VERSION=$1 FULLNAME=pandoc-$VERSION @@ -8,11 +8,11 @@ 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/$FULLNAME/assets?name=$FULLNAME.dmg" + "https://uploads.github.com/repos/jgm/pandoc/releases/$VERSION/assets?name=$FULLNAME.dmg" curl -H "Authorization: token $TOKEN" \ -H "Accept: application/vnd.github.manifold-preview" \ -H "Content-Type: application/x-msi" \ --data-binary @$FULLNAME.msi \ - "https://uploads.github.com/repos/jgm/pandoc/releases/$FULLNAME/assets?name=$FULLNAME.msi" + "https://uploads.github.com/repos/jgm/pandoc/releases/$VERSION/assets?name=$FULLNAME.msi" -- cgit v1.2.3 From fcc94c788bc6f021da4df0f2e80ed4cff577d9a2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 8 Dec 2013 10:30:14 -0800 Subject: OSX package: Create .zip rather than .dmg. --- github-upload.sh | 4 ++-- googlecode-upload.sh | 2 +- make_osx_package.sh | 21 ++++++++++++++------- 3 files changed, 17 insertions(+), 10 deletions(-) (limited to 'github-upload.sh') diff --git a/github-upload.sh b/github-upload.sh index 51000ae1d..875d51831 100755 --- a/github-upload.sh +++ b/github-upload.sh @@ -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" \ diff --git a/googlecode-upload.sh b/googlecode-upload.sh index 19975ca91..40fba78e2 100755 --- a/googlecode-upload.sh +++ b/googlecode-upload.sh @@ -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 diff --git a/make_osx_package.sh b/make_osx_package.sh index a4eb404f0..384cb89cc 100755 --- a/make_osx_package.sh +++ b/make_osx_package.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e DIST=`pwd`/osx_package SANDBOX=`pwd`/.cabal-sandbox @@ -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 @@ -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 \ @@ -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" -- cgit v1.2.3