on master help sign in
Update installers/mac for simpler monorepo build process
0962115Evan Czaplicki
installers/mac/make-installer.sh+8−20
@@ -1,17 +1,15 @@
1#!/bin/sh
1#!/bin/sh
2# Run the following command to create an installer:
2# Run the following command to create an installer:
3#
3#
4−# bash make-installer.sh 0.13
4+# bash make-installer.sh
5#
5#
6−# This will work iff the version you give is defined in BuildFromSource.hs
6+
7
7
8
8
9#### SETUP ####
9#### SETUP ####
10
10
11set -e
11set -e
12
12
13−version=$1
14−
15# Create directory structure for new pkgs
13# Create directory structure for new pkgs
16pkg_root=$(mktemp -d -t package-artifacts)
14pkg_root=$(mktemp -d -t package-artifacts)
17pkg_binaries=$pkg_root
15pkg_binaries=$pkg_root
@@ -23,20 +21,10 @@ mkdir -p $pkg_scripts
23usr_binaries=/usr/local/bin
21usr_binaries=/usr/local/bin
24
22
25
23
26−#### BUILD ELM PLATFORM ####
24+#### BUILD ASSETS ####
27−
28−runhaskell ../BuildFromSource.hs $version
29−
30−platform=Elm-Platform/$version
31−
32−
33−#### COPY BINARIES ####
34
25
35−# Copy executables into pkg_binaries directory
26+(cd ../.. ; cabal sandbox init ; cabal install)
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
27+cp ../../.cabal-sandbox/bin/elm $pkg_binaries/elm
39−done
40
28
41cp $(pwd)/preinstall $pkg_scripts
29cp $(pwd)/preinstall $pkg_scripts
42cp $(pwd)/postinstall $pkg_scripts
30cp $(pwd)/postinstall $pkg_scripts
@@ -50,15 +38,15 @@ pkgbuild \
50 binaries.pkg
38 binaries.pkg
51
39
52
40
53−#### CREATE PACKAGE ####
41+#### BUNDLE ASSETS ####
54
42
55−rm -f Elm-Platform-$version.pkg
43+rm -f Elm-Platform.pkg
56
44
57productbuild \
45productbuild \
58 --distribution Distribution.xml \
46 --distribution Distribution.xml \
59 --package-path . \
47 --package-path . \
60 --resources Resources \
48 --resources Resources \
61− Elm-Platform-$version.pkg
49+ Elm-Platform.pkg
62
50
63
51
64#### CLEAN UP ####
52#### CLEAN UP ####