mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 19:26:33 +00:00
chore: add Makefile to build OS X and GNU/Linux (#922)
This Makefile ties together all the build scripts we've been developing so far. It currently only supports UNIX based operating systems, but Windows support will be added soon. Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
parent
4f233f20e0
commit
68a71d89e2
1
.gitignore
vendored
1
.gitignore
vendored
@ -29,6 +29,7 @@ node_modules
|
||||
bower_components
|
||||
|
||||
# Compiled Electron releases
|
||||
release/
|
||||
etcher-release/
|
||||
|
||||
# Certificates
|
||||
|
@ -45,13 +45,13 @@ install:
|
||||
- npm install -g bower
|
||||
- npm install -g electron-installer-debian
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
./scripts/build/linux.sh develop-electron x64;
|
||||
make electron-develop
|
||||
fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
brew install afsctool;
|
||||
fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
./scripts/build/darwin.sh develop-electron;
|
||||
make electron-develop
|
||||
fi
|
||||
|
||||
before_script:
|
||||
|
195
Makefile
Normal file
195
Makefile
Normal file
@ -0,0 +1,195 @@
|
||||
# ---------------------------------------------------------------------
|
||||
# Application configuration
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
SIGN_IDENTITY_OSX = Developer ID Application: Rulemotion Ltd (66H43P8FRG)
|
||||
ELECTRON_VERSION = $(shell node -e "console.log(require('./package.json').devDependencies['electron-prebuilt'])")
|
||||
APPLICATION_NAME = $(shell node -e "console.log(require('./package.json').displayName)")
|
||||
APPLICATION_DESCRIPTION=$(shell node -e "console.log(require('./package.json').description)")
|
||||
APPLICATION_VERSION = $(shell node -e "console.log(require('./package.json').version)")
|
||||
APPLICATION_COPYRIGHT = $(shell node -e "console.log(require('./package.json').copyright)")
|
||||
APPLICATION_CATEGORY = public.app-category.developer-tools
|
||||
APPLICATION_BUNDLE_ID = io.resin.etcher
|
||||
APPLICATION_FILES = lib,build,assets
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Operating system and architecture detection
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
# http://stackoverflow.com/a/12099167
|
||||
ifeq ($(OS),Windows_NT)
|
||||
HOST_PLATFORM = win32
|
||||
|
||||
ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
|
||||
HOST_ARCH = x64
|
||||
else
|
||||
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
|
||||
HOST_ARCH = x64
|
||||
endif
|
||||
ifeq ($(PROCESSOR_ARCHITECTURE),x86)
|
||||
HOST_ARCH = x86
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq ($(shell uname -s),Linux)
|
||||
HOST_PLATFORM = linux
|
||||
|
||||
ifeq ($(shell uname -p),x86_64)
|
||||
HOST_ARCH = x64
|
||||
endif
|
||||
ifneq ($(filter %86,$(shell uname -p)),)
|
||||
HOST_ARCH = x86
|
||||
endif
|
||||
endif
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
HOST_PLATFORM = darwin
|
||||
|
||||
ifeq ($(shell uname -m),x86_64)
|
||||
HOST_ARCH = x64
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef HOST_PLATFORM
|
||||
$(error We couldn\'t detect your host platform)
|
||||
endif
|
||||
ifndef HOST_ARCH
|
||||
$(error We couldn\'t detect your host architecture)
|
||||
endif
|
||||
|
||||
TARGET_PLATFORM = $(HOST_PLATFORM)
|
||||
|
||||
ifneq ($(TARGET_PLATFORM),$(HOST_PLATFORM))
|
||||
$(error We don\'t support cross-platform builds yet)
|
||||
endif
|
||||
|
||||
# Default to host architecture. You can override by doing:
|
||||
#
|
||||
# make <target> TARGET_ARCH=<arch>
|
||||
#
|
||||
TARGET_ARCH = $(HOST_ARCH)
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Extra variables
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
TARGET_ARCH_DEBIAN = i386
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH),x64)
|
||||
TARGET_ARCH_DEBIAN = amd64
|
||||
endif
|
||||
|
||||
TEMPORARY_DIRECTORY = release/.tmp
|
||||
APPLICATION_NAME_LOWERCASE = $(shell echo $(APPLICATION_NAME) | tr A-Z a-z)
|
||||
APPLICATION_VERSION_DEBIAN = $(shell echo $(APPLICATION_VERSION) | tr "-" "~")
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Rules
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app:
|
||||
./scripts/unix/electron-create-resources-app.sh -s . -f "$(APPLICATION_FILES)" -o $@
|
||||
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app/node_modules:\
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app
|
||||
./scripts/unix/dependencies-npm.sh -p -r "$(TARGET_ARCH)" -v "$(ELECTRON_VERSION)" -x $< -t electron
|
||||
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app/bower_components:\
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app
|
||||
./scripts/unix/dependencies-bower.sh -p -x $<
|
||||
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app.asar: \
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app \
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app/node_modules \
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app/bower_components
|
||||
./scripts/unix/electron-create-asar.sh -d $< -o $@
|
||||
|
||||
release/$(APPLICATION_NAME)-$(TARGET_PLATFORM)-$(TARGET_ARCH): \
|
||||
release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app.asar
|
||||
./scripts/unix/electron-download-package.sh -r "$(TARGET_ARCH)" -v "$(ELECTRON_VERSION)" -s "$(TARGET_PLATFORM)" -o $@
|
||||
ifeq ($(TARGET_PLATFORM),darwin)
|
||||
./scripts/darwin/electron-configure-package-darwin.sh -d $@ -a $< \
|
||||
-n "$(APPLICATION_NAME)" \
|
||||
-v "$(APPLICATION_VERSION)" \
|
||||
-b "$(APPLICATION_BUNDLE_ID)" \
|
||||
-c "$(APPLICATION_COPYRIGHT)" \
|
||||
-t "$(APPLICATION_CATEGORY)" \
|
||||
-i assets/icon.icns
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),linux)
|
||||
./scripts/linux/electron-configure-package-linux.sh -d $@ -a $< \
|
||||
-n "$(APPLICATION_NAME)" \
|
||||
-v "$(APPLICATION_VERSION)" \
|
||||
-l LICENSE
|
||||
endif
|
||||
|
||||
release/out/$(APPLICATION_NAME)-$(APPLICATION_VERSION)-darwin-$(TARGET_ARCH).zip: \
|
||||
release/$(APPLICATION_NAME)-darwin-$(TARGET_ARCH)
|
||||
./scripts/darwin/electron-sign-app.sh -a $</$(APPLICATION_NAME).app -i "$(SIGN_IDENTITY_OSX)"
|
||||
./scripts/darwin/electron-installer-app-zip.sh -a $</$(APPLICATION_NAME).app -o $@
|
||||
|
||||
release/out/$(APPLICATION_NAME)-$(APPLICATION_VERSION)-darwin-$(TARGET_ARCH).dmg: \
|
||||
release/$(APPLICATION_NAME)-darwin-$(TARGET_ARCH)
|
||||
./scripts/darwin/electron-installer-dmg.sh -p $< -o $@ \
|
||||
-n "$(APPLICATION_NAME)" \
|
||||
-v "$(APPLICATION_VERSION)" \
|
||||
-d "$(SIGN_IDENTITY_OSX)" \
|
||||
-i assets/icon.icns \
|
||||
-b assets/osx/installer.png
|
||||
|
||||
release/out/$(APPLICATION_NAME)-$(APPLICATION_VERSION)-linux-$(TARGET_ARCH).zip: \
|
||||
release/$(APPLICATION_NAME)-linux-$(TARGET_ARCH)
|
||||
TMPDIR=$(TEMPORARY_DIRECTORY) ./scripts/linux/electron-installer-appimage.sh -p $< -o $@ \
|
||||
-n "$(APPLICATION_NAME)" \
|
||||
-d "$(APPLICATION_DESCRIPTION)" \
|
||||
-r "$(TARGET_ARCH)" \
|
||||
-b "$(APPLICATION_NAME_LOWERCASE)" \
|
||||
-i assets/icon.png
|
||||
|
||||
release/out/$(APPLICATION_NAME_LOWERCASE)-electron_$(APPLICATION_VERSION_DEBIAN)_$(TARGET_ARCH_DEBIAN).deb: \
|
||||
release/$(APPLICATION_NAME)-linux-$(TARGET_ARCH)
|
||||
./scripts/linux/electron-installer-debian.sh -p $< -r "$(TARGET_ARCH)" \
|
||||
-c scripts/build/debian/config.json \
|
||||
-o $(dir $@)
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Phony targets
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
.PHONY: \
|
||||
info \
|
||||
clean \
|
||||
electron-develop \
|
||||
electron-installer-dmg \
|
||||
electron-installer-app-zip \
|
||||
electron-installer-appimage \
|
||||
electron-installer-debian
|
||||
|
||||
electron-develop:
|
||||
# Since we use an `npm-shrinkwrap.json` file, if you pull changes
|
||||
# that update a dependency and try to `npm install` directly, npm
|
||||
# will complain that your `node_modules` tree is not equal to what
|
||||
# is defined by the `npm-shrinkwrap.json` file, and will thus
|
||||
# refuse to do anything but install from scratch.
|
||||
rm -rf node_modules
|
||||
./scripts/unix/dependencies-npm.sh -r "$(TARGET_ARCH)" -v "$(ELECTRON_VERSION)" -t electron
|
||||
./scripts/unix/dependencies-bower.sh
|
||||
|
||||
ifeq ($(TARGET_PLATFORM),darwin)
|
||||
electron-installer-app-zip: release/out/$(APPLICATION_NAME)-$(APPLICATION_VERSION)-$(TARGET_PLATFORM)-$(TARGET_ARCH).zip
|
||||
electron-installer-dmg: release/out/$(APPLICATION_NAME)-$(APPLICATION_VERSION)-$(TARGET_PLATFORM)-$(TARGET_ARCH).dmg
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),linux)
|
||||
electron-installer-appimage: release/out/$(APPLICATION_NAME)-$(APPLICATION_VERSION)-$(TARGET_PLATFORM)-$(TARGET_ARCH).zip
|
||||
electron-installer-debian: release/out/$(APPLICATION_NAME_LOWERCASE)-electron_$(APPLICATION_VERSION_DEBIAN)_$(TARGET_ARCH_DEBIAN).deb
|
||||
endif
|
||||
|
||||
info:
|
||||
@echo "Host platform : $(HOST_PLATFORM)"
|
||||
@echo "Host arch : $(HOST_ARCH)"
|
||||
@echo "Target platform : $(TARGET_PLATFORM)"
|
||||
@echo "Target arch : $(TARGET_ARCH)"
|
||||
|
||||
clean:
|
||||
rm -rf release
|
@ -29,26 +29,29 @@ employee by asking for it from the relevant people.
|
||||
Packaging
|
||||
---------
|
||||
|
||||
The resulting installers will be saved to `etcher-release/installers`.
|
||||
|
||||
### OS X
|
||||
|
||||
Run the following command:
|
||||
|
||||
```sh
|
||||
$ ./scripts/build/darwin.sh installer-dmg
|
||||
$ ./scripts/build/darwin.sh installer-zip
|
||||
make electron-installer-dmg
|
||||
make electron-installer-app-zip
|
||||
```
|
||||
|
||||
The resulting installers will be saved to `release/out`.
|
||||
|
||||
### GNU/Linux
|
||||
|
||||
Run the following command:
|
||||
|
||||
```sh
|
||||
$ ./scripts/build/linux.sh installer-appimage <x64|x86>
|
||||
$ ./scripts/build/linux.sh installer-debian <x64|x86>
|
||||
make electron-installer-appimage
|
||||
make electron-installer-debian
|
||||
```
|
||||
|
||||
The resulting installers will be saved to `release/out`.
|
||||
|
||||
### Windows
|
||||
|
||||
Run the following command:
|
||||
@ -57,6 +60,8 @@ Run the following command:
|
||||
> .\scripts\build\windows.bat all <x64|x86>
|
||||
```
|
||||
|
||||
The resulting installers will be saved to `etcher-release/installers`.
|
||||
|
||||
Publishing to Bintray
|
||||
---------------------
|
||||
|
||||
|
@ -50,13 +50,13 @@ the application might not run successfully.
|
||||
### OS X
|
||||
|
||||
```sh
|
||||
./scripts/build/darwin.sh develop-electron
|
||||
make electron-develop
|
||||
```
|
||||
|
||||
### GNU/Linux
|
||||
|
||||
```sh
|
||||
./scripts/build/linux.sh develop-electron <x64|x86>
|
||||
make electron-develop
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
@ -1,163 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
###
|
||||
# Copyright 2016 resin.io
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
###
|
||||
|
||||
# See http://www.davidpashley.com/articles/writing-robust-shell-scripts/
|
||||
set -u
|
||||
set -e
|
||||
set -x
|
||||
|
||||
function check_dep() {
|
||||
if ! command -v $1 2>/dev/null 1>&2; then
|
||||
echo "Dependency missing: $1" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
OS=`uname`
|
||||
if [[ "$OS" != "Darwin" ]]; then
|
||||
echo "This script is only meant to be run in OS X" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <command>" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COMMAND=$1
|
||||
SIGN_IDENTITY_OSX="Developer ID Application: Rulemotion Ltd (66H43P8FRG)"
|
||||
ELECTRON_VERSION=`node -e "console.log(require('./package.json').devDependencies['electron-prebuilt'])"`
|
||||
APPLICATION_NAME=`node -e "console.log(require('./package.json').displayName)"`
|
||||
APPLICATION_COPYRIGHT=`node -e "console.log(require('./package.json').copyright)"`
|
||||
APPLICATION_VERSION=`node -e "console.log(require('./package.json').version)"`
|
||||
|
||||
if [ "$COMMAND" == "cli" ]; then
|
||||
./scripts/unix/dependencies-npm.sh -r x64 -v 6.2.2 -t node -f -p
|
||||
./scripts/unix/package-cli.sh \
|
||||
-n etcher \
|
||||
-e bin/etcher \
|
||||
-r x64 \
|
||||
-s darwin \
|
||||
-o etcher-release/etcher-cli-darwin-x64
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$COMMAND" == "develop-electron" ]; then
|
||||
./scripts/unix/dependencies-npm.sh \
|
||||
-r x64 \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-t electron
|
||||
./scripts/unix/dependencies-bower.sh
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$COMMAND" == "installer-dmg" ]; then
|
||||
./scripts/unix/electron-create-resources-app.sh \
|
||||
-s . \
|
||||
-f "lib,build,assets" \
|
||||
-o "etcher-release/app"
|
||||
|
||||
./scripts/unix/dependencies-npm.sh -p \
|
||||
-r x64 \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-x "etcher-release/app" \
|
||||
-t electron
|
||||
|
||||
./scripts/unix/dependencies-bower.sh -p \
|
||||
-x "etcher-release/app"
|
||||
|
||||
./scripts/unix/electron-create-asar.sh \
|
||||
-d "etcher-release/app" \
|
||||
-o "etcher-release/app.asar"
|
||||
|
||||
./scripts/unix/electron-download-package.sh \
|
||||
-r x64 \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-s darwin \
|
||||
-o etcher-release/$APPLICATION_NAME-darwin-x64
|
||||
|
||||
./scripts/darwin/electron-configure-package-darwin.sh \
|
||||
-d etcher-release/$APPLICATION_NAME-darwin-x64 \
|
||||
-n $APPLICATION_NAME \
|
||||
-v $APPLICATION_VERSION \
|
||||
-b io.resin.etcher \
|
||||
-c "$APPLICATION_COPYRIGHT" \
|
||||
-t public.app-category.developer-tools \
|
||||
-a "etcher-release/app.asar" \
|
||||
-i assets/icon.icns
|
||||
|
||||
./scripts/darwin/electron-installer-dmg.sh \
|
||||
-n $APPLICATION_NAME \
|
||||
-v $APPLICATION_VERSION \
|
||||
-p etcher-release/$APPLICATION_NAME-darwin-x64 \
|
||||
-d "$SIGN_IDENTITY_OSX" \
|
||||
-i assets/icon.icns \
|
||||
-b assets/osx/installer.png \
|
||||
-o etcher-release/installers/$APPLICATION_NAME-$APPLICATION_VERSION-darwin-x64.dmg
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$COMMAND" == "installer-zip" ]; then
|
||||
./scripts/unix/electron-create-resources-app.sh \
|
||||
-s . \
|
||||
-f "lib,build,assets" \
|
||||
-o "etcher-release/app"
|
||||
|
||||
./scripts/unix/dependencies-npm.sh -p \
|
||||
-r x64 \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-x "etcher-release/app" \
|
||||
-t electron
|
||||
|
||||
./scripts/unix/dependencies-bower.sh -p \
|
||||
-x "etcher-release/app"
|
||||
|
||||
./scripts/unix/electron-create-asar.sh \
|
||||
-d "etcher-release/app" \
|
||||
-o "etcher-release/app.asar"
|
||||
|
||||
./scripts/unix/electron-download-package.sh \
|
||||
-r x64 \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-s darwin \
|
||||
-o etcher-release/$APPLICATION_NAME-darwin-x64
|
||||
|
||||
./scripts/darwin/electron-configure-package-darwin.sh \
|
||||
-d etcher-release/$APPLICATION_NAME-darwin-x64 \
|
||||
-n $APPLICATION_NAME \
|
||||
-v $APPLICATION_VERSION \
|
||||
-b io.resin.etcher \
|
||||
-c "$APPLICATION_COPYRIGHT" \
|
||||
-t public.app-category.developer-tools \
|
||||
-a "etcher-release/app.asar" \
|
||||
-i assets/icon.icns
|
||||
|
||||
./scripts/darwin/electron-sign-app.sh \
|
||||
-a etcher-release/$APPLICATION_NAME-darwin-x64/$APPLICATION_NAME.app \
|
||||
-i "$SIGN_IDENTITY_OSX"
|
||||
|
||||
./scripts/darwin/electron-installer-app-zip.sh \
|
||||
-a etcher-release/$APPLICATION_NAME-darwin-x64/$APPLICATION_NAME.app \
|
||||
-o etcher-release/installers/$APPLICATION_NAME-$APPLICATION_VERSION-darwin-x64.zip
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Unknown command: $COMMAND" 1>&2
|
||||
exit 1
|
@ -1,177 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
###
|
||||
# Copyright 2016 resin.io
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
###
|
||||
|
||||
# See http://www.davidpashley.com/articles/writing-robust-shell-scripts/
|
||||
set -u
|
||||
set -e
|
||||
set -x
|
||||
|
||||
function check_dep() {
|
||||
if ! command -v $1 2>/dev/null 1>&2; then
|
||||
echo "Dependency missing: $1" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
OS=`uname`
|
||||
if [[ "$OS" != "Linux" ]]; then
|
||||
echo "This script is only meant to be run in GNU/Linux" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 <command> <arch>" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COMMAND=$1
|
||||
ARCH=$2
|
||||
if [ "$ARCH" != "x64" ] &&
|
||||
[ "$ARCH" != "x86" ];
|
||||
then
|
||||
echo "Unknown architecture: $ARCH" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ELECTRON_VERSION=`node -e "console.log(require('./package.json').devDependencies['electron-prebuilt'])"`
|
||||
NODE_VERSION="6.2.2"
|
||||
APPLICATION_NAME=`node -e "console.log(require('./package.json').displayName)"`
|
||||
APPLICATION_DESCRIPTION=`node -e "console.log(require('./package.json').description)"`
|
||||
APPLICATION_VERSION=`node -e "console.log(require('./package.json').version)"`
|
||||
|
||||
if [ "$COMMAND" == "develop-electron" ]; then
|
||||
./scripts/unix/dependencies-npm.sh \
|
||||
-r "$ARCH" \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-t electron
|
||||
./scripts/unix/dependencies-bower.sh
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$COMMAND" == "develop-cli" ]; then
|
||||
./scripts/unix/dependencies-npm.sh \
|
||||
-r "$ARCH" \
|
||||
-v "$NODE_VERSION" \
|
||||
-t node
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$COMMAND" == "installer-cli" ]; then
|
||||
./scripts/unix/dependencies-npm.sh -f -p \
|
||||
-r "$ARCH" \
|
||||
-v "$NODE_VERSION" \
|
||||
-t node
|
||||
|
||||
./scripts/unix/package-cli.sh \
|
||||
-n etcher \
|
||||
-e bin/etcher \
|
||||
-r "$ARCH" \
|
||||
-s linux \
|
||||
-o etcher-release/etcher-cli-linux-$ARCH
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$COMMAND" == "installer-debian" ]; then
|
||||
./scripts/unix/electron-create-resources-app.sh \
|
||||
-s . \
|
||||
-f "lib,build,assets" \
|
||||
-o "etcher-release/app"
|
||||
|
||||
./scripts/unix/dependencies-npm.sh -p \
|
||||
-r "$ARCH" \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-x "etcher-release/app" \
|
||||
-t electron
|
||||
|
||||
./scripts/unix/dependencies-bower.sh -p \
|
||||
-x "etcher-release/app"
|
||||
|
||||
./scripts/unix/electron-create-asar.sh \
|
||||
-d "etcher-release/app" \
|
||||
-o "etcher-release/app.asar"
|
||||
|
||||
./scripts/unix/electron-download-package.sh \
|
||||
-r "$ARCH" \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-s linux \
|
||||
-o "etcher-release/$APPLICATION_NAME-linux-$ARCH"
|
||||
|
||||
./scripts/linux/electron-configure-package-linux.sh \
|
||||
-d etcher-release/$APPLICATION_NAME-linux-$ARCH \
|
||||
-n "$APPLICATION_NAME" \
|
||||
-v "$APPLICATION_VERSION" \
|
||||
-l LICENSE \
|
||||
-a "etcher-release/app.asar"
|
||||
|
||||
./scripts/linux/electron-installer-debian.sh \
|
||||
-p etcher-release/$APPLICATION_NAME-linux-$ARCH \
|
||||
-r "$ARCH" \
|
||||
-c scripts/build/debian/config.json \
|
||||
-o etcher-release/installers
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$COMMAND" == "installer-appimage" ]; then
|
||||
check_dep zip
|
||||
|
||||
./scripts/unix/electron-create-resources-app.sh \
|
||||
-s . \
|
||||
-f "lib,build,assets" \
|
||||
-o "etcher-release/app"
|
||||
|
||||
./scripts/unix/dependencies-npm.sh -p \
|
||||
-r "$ARCH" \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-x "etcher-release/app" \
|
||||
-t electron
|
||||
|
||||
./scripts/unix/dependencies-bower.sh -p \
|
||||
-x "etcher-release/app"
|
||||
|
||||
./scripts/unix/electron-create-asar.sh \
|
||||
-d "etcher-release/app" \
|
||||
-o "etcher-release/app.asar"
|
||||
|
||||
./scripts/unix/electron-download-package.sh \
|
||||
-r "$ARCH" \
|
||||
-v "$ELECTRON_VERSION" \
|
||||
-s linux \
|
||||
-o "etcher-release/$APPLICATION_NAME-linux-$ARCH"
|
||||
|
||||
./scripts/linux/electron-configure-package-linux.sh \
|
||||
-d etcher-release/$APPLICATION_NAME-linux-$ARCH \
|
||||
-n "$APPLICATION_NAME" \
|
||||
-v "$APPLICATION_VERSION" \
|
||||
-l LICENSE \
|
||||
-a "etcher-release/app.asar"
|
||||
|
||||
./scripts/linux/electron-installer-appimage.sh \
|
||||
-n "$APPLICATION_NAME" \
|
||||
-d "$APPLICATION_DESCRIPTION" \
|
||||
-p etcher-release/$APPLICATION_NAME-linux-$ARCH \
|
||||
-r $ARCH \
|
||||
-b etcher \
|
||||
-i assets/icon.png \
|
||||
-o etcher-release/installers/$APPLICATION_NAME-$APPLICATION_VERSION-linux-$ARCH.zip
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Unknown command: $COMMAND" 1>&2
|
||||
exit 1
|
Loading…
x
Reference in New Issue
Block a user