|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
| 3 | +# |
| 4 | +# Copyright 2017-2018 IBM Corporation |
| 5 | +# |
| 6 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +# you may not use this file except in compliance with the License. |
| 8 | +# You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, software |
| 13 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +# See the License for the specific language governing permissions and |
| 16 | +# limitations under the License. |
| 17 | +# |
| 18 | + |
3 | 19 | # |
4 | 20 | # input params: choose a platform to build for (default: all) |
5 | 21 | # |
6 | 22 | PLATFORM=${1-all} |
7 | 23 |
|
8 | 24 | # product name |
9 | | -PRODUCT_NAME="${PRODUCT_NAME-`cat ../app/build/config.json | jq --raw-output .productName`}" |
| 25 | +export PRODUCT_NAME="${PRODUCT_NAME-`cat ../app/build/config.json | jq --raw-output .productName`}" |
10 | 26 |
|
11 | 27 | # filesystem icons |
12 | 28 | ICON_MAC=`cat ../app/build/config.json | jq --raw-output .filesystemIcons.darwin` |
13 | 29 | ICON_WIN32=`cat ../app/build/config.json | jq --raw-output .filesystemIcons.win32` |
14 | 30 | ICON_LINUX=`cat ../app/build/config.json | jq --raw-output .filesystemIcons.linux` |
15 | 31 |
|
16 | 32 | VERSION=`git rev-parse master` |
17 | | -BUILDDIR=build |
| 33 | +export BUILDDIR=build |
18 | 34 |
|
19 | 35 | # if we're running a test against a dist build, then we need to tell |
20 | 36 | # electron-packager to keep around devDependencies |
@@ -85,6 +101,10 @@ function win32 { |
85 | 101 | # |
86 | 102 | if [ -z "$NO_INSTALLER" ]; then |
87 | 103 | (cd $BUILDDIR && zip -q -r "${PRODUCT_NAME}-win32-x64" "${PRODUCT_NAME}-win32-x64" -x \*~) |
| 104 | + |
| 105 | + # build squirrel and msi installers |
| 106 | + # SETUP_ICON=$ICON_WIN32 node builders/squirrel.js |
| 107 | + # SETUP_ICON=$ICON_WIN32 node builders/msi.js |
88 | 108 | fi |
89 | 109 | fi |
90 | 110 | } |
@@ -151,11 +171,7 @@ function linux { |
151 | 171 |
|
152 | 172 | if [ -z "$NO_INSTALLER" ]; then |
153 | 173 | (cd $BUILDDIR && zip -q -r "${PRODUCT_NAME}-linux-x64" "${PRODUCT_NAME}-linux-x64" -x \*~) |
154 | | - rm -f "${BUILDDIR}/installers/*.deb" |
155 | | - DEBUG=electron-installer-debian ./node_modules/.bin/electron-installer-debian --src "${BUILDDIR}/${PRODUCT_NAME}-linux-x64" --dest ${BUILDDIR}/installers/ --arch amd64 --config dpkg-config.json |
156 | | - for deb in "${BUILDDIR}/installers/*.deb"; do |
157 | | - mv -f $deb "${BUILDDIR}/${PRODUCT_NAME}-linux-x64.deb" |
158 | | - done |
| 174 | + ./builders/deb.sh |
159 | 175 | fi |
160 | 176 | fi |
161 | 177 | } |
|
0 commit comments