balena-cli/Makefile

49 lines
1.6 KiB
Makefile
Raw Normal View History

2015-02-26 18:42:11 +00:00
distribute-win32: release/build/distrib/resin-cli-win32.zip
distribute-darwin: release/build/distrib/resin-cli-darwin.tar.gz
distribute-linux: release/build/distrib/resin-cli-linux.tar.gz
installer-win32: release/build/distrib/resin-cli-setup.exe
2015-02-27 13:05:11 +00:00
installer-osx: release/build/distrib/resin-cli-setup.pkg
VERSION=0.0.1
2015-02-26 18:42:11 +00:00
release/build/resin-cli-%:
mkdir -p $@
cp -rf bin build package.json $@ && rm -rf $@/bin/node
cd $@ && RESIN_BUNDLE=$(subst resin-cli-,,`basename $@`) npm install --production --force
flatten-packages $@
release/build/distrib/resin-cli-win32.zip: release/build/resin-cli-win32
mkdir -p `dirname $@`
cd $< && zip -r ../../../$@ .
release/build/distrib/resin-cli-darwin.tar.gz: release/build/resin-cli-darwin
mkdir -p `dirname $@`
tar fcz $@ -C `dirname $<` `basename $<`
release/build/distrib/resin-cli-linux.tar.gz: release/build/resin-cli-linux
mkdir -p `dirname $@`
tar fcz $@ -C `dirname $<` `basename $<`
release/build/distrib/resin-cli-setup.exe: release/installers/win32/resin-cli.nsi release/build/distrib/resin-cli-win32.zip
makensis $<
2015-02-27 13:05:11 +00:00
release/build/cli.pkg: release/build/resin-cli-darwin
pkgbuild --root $< \
--identifier io.resin.cli \
2015-02-27 16:10:07 +00:00
--scripts release/installers/osx/scripts \
2015-02-27 13:05:11 +00:00
--version $(VERSION) \
--ownership recommended \
$@
release/build/distrib/resin-cli-setup.pkg: release/build/cli.pkg release/installers/osx/distribution.xml
mkdir -p `dirname $@`
2015-02-27 13:05:11 +00:00
productbuild --distribution $(word 2, $^) \
--resources release/installers/osx/resources \
--package-path `dirname $<` \
--version $(VERSION) \
$@
2015-02-26 18:42:11 +00:00
clean:
rm -rf release/build