From 83afb01f8c24e73f3189b6459ebca16b1787a897 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 9 Feb 2016 10:26:47 -0400 Subject: [PATCH 1/5] Ignore release directory while packaging --- package.ignore | 1 + 1 file changed, 1 insertion(+) diff --git a/package.ignore b/package.ignore index af4b0f75..25759269 100644 --- a/package.ignore +++ b/package.ignore @@ -8,6 +8,7 @@ gulpfile.js installers.json screenshot.png tests +release lib/scss node_modules/electron-mocha node_modules/electron-builder From 34150ddbbb77e551de2da46c45b8c4cd448a0f95 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 9 Feb 2016 10:28:27 -0400 Subject: [PATCH 2/5] Remove unused installers.json from package.ignore --- package.ignore | 1 - 1 file changed, 1 deletion(-) diff --git a/package.ignore b/package.ignore index 25759269..6b980fff 100644 --- a/package.ignore +++ b/package.ignore @@ -5,7 +5,6 @@ package.ignore appveyor.yml bower.json gulpfile.js -installers.json screenshot.png tests release From a306cf4461fae7a90f8b07e6a7e46fce8d050e7f Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 9 Feb 2016 10:28:49 -0400 Subject: [PATCH 3/5] Package Etcher for Linux for release --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5a7233cd..e3fe5509 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,14 @@ release/installers/Etcher.dmg: release/Etcher-darwin-x64 package.json --platform=osx \ --out=release/installers +release/installers/Etcher-linux-x64.tar.gz: release/Etcher-linux-x64 + mkdir -p $(dir $@) + tar -zcf $@ $< + +release/installers/Etcher-linux-ia32.tar.gz: release/Etcher-linux-ia32 + mkdir -p $(dir $@) + tar -zcf $@ $< + release/installers/Etcher-x64.exe: release/Etcher-win32-x64 package.json $(ELECTRON_BUILDER) $< \ --platform=win \ @@ -82,8 +90,9 @@ package-win32: release/Etcher-win32-ia32 release/Etcher-win32-x64 package-all: package-osx package-linux package-win32 installer-osx: release/installers/Etcher.dmg +installer-linux: release/installers/Etcher-linux-x64.tar.gz release/installers/Etcher-linux-ia32.tar.gz installer-win32: release/installers/Etcher-x64.exe release/installers/Etcher.exe -installer-all: installer-osx installer-win32 +installer-all: installer-osx installer-linux installer-win32 clean: rm -rf release/ From 614293b0c2a230668743beceed6c175c83607a84 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 9 Feb 2016 10:31:05 -0400 Subject: [PATCH 4/5] Remove Makefile redundancy with functions --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index e3fe5509..2ddb99a7 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ release/Etcher-darwin-x64: . --asar \ --icon="assets/icon.icns" \ --overwrite \ - --out=release/ + --out=$(dir $@) release/Etcher-linux-ia32: . $(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \ @@ -23,7 +23,7 @@ release/Etcher-linux-ia32: . --ignore="$(ELECTRON_IGNORE)" \ --asar \ --overwrite \ - --out=release/ + --out=$(dir $@) release/Etcher-linux-x64: . $(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \ @@ -33,7 +33,7 @@ release/Etcher-linux-x64: . --ignore="$(ELECTRON_IGNORE)" \ --asar \ --overwrite \ - --out=release/ + --out=$(dir $@) release/Etcher-win32-ia32: . $(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \ @@ -44,7 +44,7 @@ release/Etcher-win32-ia32: . --icon="assets/icon.ico" \ --asar \ --overwrite \ - --out=release/ + --out=$(dir $@) release/Etcher-win32-x64: . $(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \ @@ -55,12 +55,12 @@ release/Etcher-win32-x64: . --icon="assets/icon.ico" \ --asar \ --overwrite \ - --out=release/ + --out=$(dir $@) release/installers/Etcher.dmg: release/Etcher-darwin-x64 package.json $(ELECTRON_BUILDER) "$ Date: Tue, 9 Feb 2016 10:42:08 -0400 Subject: [PATCH 5/5] Implement release make rule --- Makefile | 6 ++++++ PUBLISHING.md | 21 +++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 2ddb99a7..05a74fe7 100644 --- a/Makefile +++ b/Makefile @@ -94,5 +94,11 @@ installer-linux: release/installers/Etcher-linux-x64.tar.gz release/installers/E installer-win32: release/installers/Etcher-x64.exe release/installers/Etcher.exe installer-all: installer-osx installer-linux installer-win32 +release: + rm -rf node_modules + npm install --force + npm test + make installer-all + clean: rm -rf release/ diff --git a/PUBLISHING.md b/PUBLISHING.md index 1e07982e..0977daf2 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -3,23 +3,20 @@ Publishing Etcher This is a small guide to package and publish Etcher to all supported operating systems. -Packaging ---------- +Prequisites +----------- -You need to install [wine](https://www.winehq.org) and [nsis](http://nsis.sourceforge.net/Main_Page) to package the application for Windows. +- [wine](https://www.winehq.org) +- [nsis](http://nsis.sourceforge.net/Main_Page) +- [node](https://nodejs.org) +- [GNU Make](https://www.gnu.org/software/make/) -Make sure you install npm dependencies with `--force` since there might be optional dependencies for an operating system not equal to the host that will not make it to the package otherwise: +Run the following command to make installers for all supported operating systems: ```sh -npm install --force +make release ``` -Run the following command to package Etcher - -```sh -make installer-all -``` - -The resulting packages will be saved to `release/installers`. +The resulting installers will be saved to `release/installers`. You can run `make clean` to start in a fresh state.