aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-01-14 09:20:52 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2016-01-14 09:20:52 -0800
commit20c55ab11075cc390f6dd3bd523d6f0174bb744d (patch)
treee26ec407b4a9a7e9e3464334e6deb2f052dde9b2
parentf45a8e1d3bccceeadc279fb45340e7302a0462d5 (diff)
downloadpandoc-20c55ab11075cc390f6dd3bd523d6f0174bb744d.tar.gz
make_osx_package.sh: Use env variable for developer id certs.
-rwxr-xr-xmake_osx_package.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/make_osx_package.sh b/make_osx_package.sh
index 16cddcb0c..89f97025b 100755
--- a/make_osx_package.sh
+++ b/make_osx_package.sh
@@ -11,6 +11,8 @@ SCRIPTS=$OSX/osx-resources
BASE=pandoc-$VERSION
ME=$(whoami)
PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
+DEVELOPER_ID_APPLICATION=${DEVELOPER_ID_APPLICATION:-Developer ID Application: John Macfarlane}
+DEVELOPER_ID_INSTALLER=${DEVELOPER_ID_INSTALLER:-Developer ID Installer: John Macfarlane}
# We need this for hsb2hs:
PATH=$LOCALBIN:$PATH
@@ -51,7 +53,7 @@ $LOCALBIN/pandoc --data data -t html5 -s COPYING -o $RESOURCES/license.html
echo Signing pandoc executable...
-codesign --force --sign "Developer ID Application: John Macfarlane" $DEST/bin/pandoc
+codesign --force --sign ${DEVELOPER_ID_APPLICATION} $DEST/bin/pandoc
# make sure it's valid... returns nonzero exit code if it isn't:
spctl --assess --type execute $DEST/bin/pandoc
@@ -60,7 +62,7 @@ echo Creating OSX package...
rm -rf $BASE.pkg
pkgbuild --root $DIST/pandoc --identifier net.johnmacfarlane.pandoc --version 1.13 --ownership recommended $DIST/pandoc.pkg
-productbuild --distribution osx/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign "Developer ID Installer: John Macfarlane" $BASE-osx.pkg
+productbuild --distribution osx/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign ${DEVELOPER_ID_INSTALLER} $BASE-osx.pkg
# verify signature
spctl --assess --type install $BASE-osx.pkg