Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adhere to a more formal package naming convention #201

Merged
merged 2 commits into from
Mar 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ etcher-release/Etcher-darwin-x64: .
--overwrite \
--out=$(dir $@)

etcher-release/Etcher-linux-ia32: .
etcher-release/Etcher-linux-x86: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
--platform=linux \
--arch=ia32 \
Expand All @@ -35,6 +35,7 @@ etcher-release/Etcher-linux-ia32: .
--build-version="$(ETCHER_VERSION)" \
--overwrite \
--out=$(dir $@)
mv $(dir $@)Etcher-linux-ia32 $@

etcher-release/Etcher-linux-x64: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
Expand All @@ -48,7 +49,7 @@ etcher-release/Etcher-linux-x64: .
--overwrite \
--out=$(dir $@)

etcher-release/Etcher-win32-ia32: .
etcher-release/Etcher-win32-x86: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
--platform=win32 \
--arch=ia32 \
Expand All @@ -60,6 +61,7 @@ etcher-release/Etcher-win32-ia32: .
--build-version="$(ETCHER_VERSION)" \
--overwrite \
--out=$(dir $@)
mv $(dir $@)Etcher-win32-ia32 $@

etcher-release/Etcher-win32-x64: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
Expand All @@ -74,42 +76,43 @@ etcher-release/Etcher-win32-x64: .
--overwrite \
--out=$(dir $@)

etcher-release/installers/Etcher.dmg: etcher-release/Etcher-darwin-x64 package.json
etcher-release/installers/Etcher-darwin-x64.dmg: etcher-release/Etcher-darwin-x64 package.json
$(ELECTRON_BUILDER) "$</$(APPLICATION_NAME).app" \
--platform=osx \
--sign=$(SIGN_IDENTITY_OSX) \
--out=$(dir $@)
mv $(dir $@)Etcher.dmg $@

etcher-release/installers/Etcher-linux-x64.tar.gz: etcher-release/Etcher-linux-x64
mkdir -p $(dir $@)
tar -zcf $@ $<

etcher-release/installers/Etcher-linux-ia32.tar.gz: etcher-release/Etcher-linux-ia32
etcher-release/installers/Etcher-linux-x86.tar.gz: etcher-release/Etcher-linux-x86
mkdir -p $(dir $@)
tar -zcf $@ $<

etcher-release/installers/Etcher-x64.exe: etcher-release/Etcher-win32-x64 package.json
etcher-release/installers/Etcher-win32-x64.exe: etcher-release/Etcher-win32-x64 package.json
$(ELECTRON_BUILDER) $< \
--platform=win \
--out=$(dir $@)win-x64
mv $(dir $@)win-x64/Etcher\ Setup.exe $@
rmdir $(dir $@)win-x64
--out=$(dir $@)win32-x64
mv $(dir $@)win32-x64/Etcher\ Setup.exe $@
rmdir $(dir $@)win32-x64

etcher-release/installers/Etcher.exe: etcher-release/Etcher-win32-ia32 package.json
etcher-release/installers/Etcher-win32-x86.exe: etcher-release/Etcher-win32-x86 package.json
$(ELECTRON_BUILDER) $< \
--platform=win \
--out=$(dir $@)win-ia32
mv $(dir $@)win-ia32/Etcher\ Setup.exe $@
rmdir $(dir $@)win-ia32
--out=$(dir $@)win32-x86
mv $(dir $@)win32-x86/Etcher\ Setup.exe $@
rmdir $(dir $@)win32-x86

package-osx: etcher-release/Etcher-darwin-x64
package-linux: etcher-release/Etcher-linux-ia32 etcher-release/Etcher-linux-x64
package-win32: etcher-release/Etcher-win32-ia32 etcher-release/Etcher-win32-x64
package-linux: etcher-release/Etcher-linux-x86 etcher-release/Etcher-linux-x64
package-win32: etcher-release/Etcher-win32-x86 etcher-release/Etcher-win32-x64
package-all: package-osx package-linux package-win32

installer-osx: etcher-release/installers/Etcher.dmg
installer-linux: etcher-release/installers/Etcher-linux-x64.tar.gz etcher-release/installers/Etcher-linux-ia32.tar.gz
installer-win32: etcher-release/installers/Etcher-x64.exe etcher-release/installers/Etcher.exe
installer-osx: etcher-release/installers/Etcher-darwin-x64.dmg
installer-linux: etcher-release/installers/Etcher-linux-x64.tar.gz etcher-release/installers/Etcher-linux-x86.tar.gz
installer-win32: etcher-release/installers/Etcher-win32-x64.exe etcher-release/installers/Etcher-win32-x86.exe
installer-all: installer-osx installer-linux installer-win32

S3_UPLOAD=aws s3api put-object \
Expand All @@ -119,13 +122,14 @@ S3_UPLOAD=aws s3api put-object \
--body $<

upload-linux-x64: etcher-release/installers/Etcher-linux-x64.tar.gz ; $(S3_UPLOAD)
upload-linux-ia32: etcher-release/installers/Etcher-linux-ia32.tar.gz ; $(S3_UPLOAD)
upload-win32-x64: etcher-release/installers/Etcher-x64.exe ; $(S3_UPLOAD)
upload-win32-ia32: etcher-release/installers/Etcher.exe ; $(S3_UPLOAD)

upload-osx: etcher-release/installers/Etcher.dmg ; $(S3_UPLOAD)
upload-linux: upload-linux-x64 upload-linux-ia32
upload-win32: upload-win32-x64 upload-win32-ia32
upload-linux-x86: etcher-release/installers/Etcher-linux-x86.tar.gz ; $(S3_UPLOAD)
upload-win32-x64: etcher-release/installers/Etcher-win32-x64.exe ; $(S3_UPLOAD)
upload-win32-x86: etcher-release/installers/Etcher-win32-x86.exe ; $(S3_UPLOAD)

upload-osx: etcher-release/installers/Etcher-darwin-x64.dmg ; $(S3_UPLOAD)
upload-linux: upload-linux-x64 upload-linux-x86
upload-win32: upload-win32-x64 upload-win32-x86
upload-all: upload-osx upload-linux upload-win32

clean:
rm -rf etcher-release/