on master help sign in
Update installers/mac for simpler monorepo build process
commit0962115d80026043841bf445d549b891b7e2b557 authorEvan Czaplicki <evancz@users.noreply.github.com> dateThu 22 Feb 2018, 12:02 (9 years ago) parentcdb69c3
1 file changed+8−20
installers/mac/make-installer.sh+8−20
installers/mac/make-installer.sh+8−20
@@ -1,17 +1,15 @@
11#!/bin/sh
22# Run the following command to create an installer:
33#
4−# bash make-installer.sh 0.13
4+# bash make-installer.sh
55#
6−# This will work iff the version you give is defined in BuildFromSource.hs
6+
77
88
99#### SETUP ####
1010
1111set -e
1212
13−version=$1
14−
1513# Create directory structure for new pkgs
1614pkg_root=$(mktemp -d -t package-artifacts)
1715pkg_binaries=$pkg_root
@@ -23,20 +21,10 @@ mkdir -p $pkg_scripts
2321usr_binaries=/usr/local/bin
2422
2523
26−#### BUILD ELM PLATFORM ####
27−
28−runhaskell ../BuildFromSource.hs $version
29−
30−platform=Elm-Platform/$version
31−
32−
33−#### COPY BINARIES ####
24+#### BUILD ASSETS ####
3425
35−# Copy executables into pkg_binaries directory
36−for exe in elm elm-package elm-make elm-repl elm-reactor
37−do
38− cp $platform/.cabal-sandbox/bin/$exe $pkg_binaries/$exe
39−done
26+(cd ../.. ; cabal sandbox init ; cabal install)
27+cp ../../.cabal-sandbox/bin/elm $pkg_binaries/elm
4028
4129cp $(pwd)/preinstall $pkg_scripts
4230cp $(pwd)/postinstall $pkg_scripts
@@ -50,15 +38,15 @@ pkgbuild \
5038 binaries.pkg
5139
5240
53−#### CREATE PACKAGE ####
41+#### BUNDLE ASSETS ####
5442
55−rm -f Elm-Platform-$version.pkg
43+rm -f Elm-Platform.pkg
5644
5745productbuild \
5846 --distribution Distribution.xml \
5947 --package-path . \
6048 --resources Resources \
61− Elm-Platform-$version.pkg
49+ Elm-Platform.pkg
6250
6351
6452#### CLEAN UP ####