Skip to content

Commit abfe92c

Browse files
committed
Move packaging process to electron-builder
Still a few kinks to work out with the target/node_modules folder getting blown away during development, but overall this is a much better way to generate packages.
1 parent 45941f9 commit abfe92c

31 files changed

+7706
-71
lines changed

.travis.yml

+35-31
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ addons:
1818

1919
# Versions of node.js to test
2020
node_js:
21-
- "7"
21+
- "8"
2222

2323

2424
# Specific Environment Variables
@@ -27,35 +27,41 @@ matrix:
2727
- os: linux
2828
env:
2929
- PACKAGE_OS=linux64
30-
- OUTPUT_BASE=Configurator
3130
- PACKAGE_NAME=kiibohd-configurator
3231
- PACKAGE_VERSION=$TRAVIS_TAG
3332
- PACKAGE_FULLNAME=$PACKAGE_NAME-$PACKAGE_VERSION
3433
- PLATFORM=linux
3534
- ARCH=x64
35+
- GH_TOKEN=$GITHUB_OAUTH_TOKEN
3636
- os: osx
3737
env:
3838
- PACKAGE_OS=macOS
39-
- OUTPUT_BASE=Configurator
4039
- PACKAGE_NAME=kiibohd-configurator
4140
- PACKAGE_VERSION=$TRAVIS_TAG
4241
- PACKAGE_FULLNAME=$PACKAGE_NAME-$PACKAGE_VERSION
4342
- PLATFORM=darwin
4443
- ARCH=x64
44+
- GH_TOKEN=$GITHUB_OAUTH_TOKEN
4545

4646
cache:
4747
directories:
4848
- node_modules
4949
- $HOME/.m2
50+
- $HOME/.boot/cache/bin
51+
- $HOME/.boot/cache/lib
52+
- $HOME/bin
5053

5154
# Package Setup
5255
before_install:
5356
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
5457
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install tree libusb; fi
5558

56-
5759
# System setup
5860
install:
61+
# Setup local bin
62+
- mkdir -p ~/bin
63+
- export PATH=~/bin:$PATH
64+
5965
# Info about OS
6066
- uname -a
6167

@@ -65,43 +71,41 @@ install:
6571
# Get version of node.js
6672
- npm --version
6773

68-
# Get boot-cljs and show version
69-
- wget -O boot https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh
70-
- chmod 755 boot
71-
- ./boot -V
74+
# Get boot-clj and show version
75+
- wget -O ~/bin/boot https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh
76+
- chmod 755 ~/bin/boot
77+
- boot -V
7278

7379
# Install electron and dependencies
80+
- npm install -g node-pre-gyp
7481
- npm install
75-
- npm run res-install
76-
7782

7883
# Build and packaging
7984
script:
8085
# Build clojure target
81-
- ./boot prod-build
86+
- boot prod-build
8287

8388
# Example deployment file
8489
- mkdir -p output
8590

8691
# Build electron binary
87-
- ./node_modules/.bin/electron-packager target --out=output --platform=$PLATFORM --arch=$ARCH
88-
89-
90-
# Deploy release
91-
deploy:
92-
provider: releases
93-
api_key: $GITHUB_OAUTH_TOKEN
94-
skip_cleanup: true
95-
draft: true # XXX Must "publish" on github
96-
prerelease: true # XXX Set this to false to enable a stable release
97-
file_glob: true
98-
file: output/$OUTPUT_BASE-$PLATFORM-$ARCH/*
99-
on:
100-
tags: true
101-
repo: kiibohd/configurator
102-
103-
104-
## Post test script commands
105-
#after_script:
106-
# - tree output
92+
- ./node_modules/.bin/build --publish onTagOrDraft
93+
94+
## Deploy release
95+
#deploy:
96+
# provider: releases
97+
# api_key: $GITHUB_OAUTH_TOKEN
98+
# skip_cleanup: true
99+
# draft: true # XXX Must "publish" on github
100+
# prerelease: true # XXX Set this to false to enable a stable release
101+
# file_glob: true
102+
# file: output/$PACKAGE_NAME-*
103+
# on:
104+
# tags: true
105+
# repo: kiibohd/configurator
106+
107+
108+
# Post test script commands
109+
after_script:
110+
- tree output
107111

appveyor.yml

+28-27
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ image: Visual Studio 2015
66
# Environment Variables
77
environment:
88
PACKAGE_NAME: kiibohd-configurator
9-
OUTPUT_BASE: Configurator
9+
GH_TOKEN:
10+
secure: vsCcKfR71BF5WWBmtzNzowpU96iPjuF3cD7yBdEySG0ku2svWAJRgdSj9je/He35
1011
matrix:
1112
- platform: x86
1213
PACKAGE_OS: win32
13-
nodejs_version: "7"
14+
nodejs_version: "8"
1415
ARCH: ia32
1516
- platform: x64
1617
PACKAGE_OS: win32
17-
nodejs_version: "7"
18+
nodejs_version: "8"
1819
ARCH: x64
1920

2021

@@ -43,9 +44,8 @@ install:
4344
- boot -V
4445

4546
# Install electron and dependencies
46-
- npm install
4747
- npm install -g node-pre-gyp
48-
- npm run res-install
48+
- npm install
4949

5050

5151
# Build Commands
@@ -56,28 +56,29 @@ build_script:
5656
- mkdir -p output
5757

5858
# Build electron binary
59-
- ./node_modules/.bin/electron-packager target --out=output --platform=%PACKAGE_OS% --arch=%ARCH%
60-
- 7z a output/%OUTPUT_BASE%-%PACKAGE_OS%-%ARCH%.zip ./output/%OUTPUT_BASE%-%PACKAGE_OS%-%ARCH%/*
61-
62-
# Deployment Artifacts
63-
artifacts:
64-
- path: output\%OUTPUT_BASE%-%PACKAGE_OS%-%ARCH%.zip
65-
name: build_artifact
66-
67-
68-
# Deployment (tagged releases only)
69-
deploy:
70-
# GitHub Releases
71-
- provider: GitHub
72-
auth_token:
73-
secure: vsCcKfR71BF5WWBmtzNzowpU96iPjuF3cD7yBdEySG0ku2svWAJRgdSj9je/He35
74-
draft: true
75-
prerelease: true
76-
description: 'Electron-based UI for configuring programmable keyboards designed by Input Club'
77-
artifact: build_artifact
78-
# Conditions for uploading release
79-
on:
80-
appveyor_repo_tag: true
59+
- ./node_modules/.bin/build --%ARCH% --publish onTagOrDraft
60+
61+
## Deployment Artifacts
62+
#artifacts:
63+
# - path: output\%PACKAGE-NAME%-*.zip
64+
# name: zip-file
65+
#
66+
# -path
67+
#
68+
#
69+
## Deployment (tagged releases only)
70+
#deploy:
71+
# # GitHub Releases
72+
# - provider: GitHub
73+
# auth_token:
74+
# secure: vsCcKfR71BF5WWBmtzNzowpU96iPjuF3cD7yBdEySG0ku2svWAJRgdSj9je/He35
75+
# draft: true
76+
# prerelease: true
77+
# description: 'Electron-based UI for configuring programmable keyboards designed by Input Club'
78+
# artifact: build_artifact
79+
# # Conditions for uploading release
80+
# on:
81+
# appveyor_repo_tag: true
8182

8283

8384
## Post Build Commands

build/icons/icon-1024x1024.png

26.9 KB
Loading

build/icons/icon-128x128.png

6.53 KB
Loading

build/icons/icon-16x16.png

833 Bytes
Loading

build/icons/icon-24x24.png

1.36 KB
Loading

build/icons/icon-256x256.png

12.6 KB
Loading

build/icons/icon-32x32.png

1.8 KB
Loading

build/icons/icon-48x48.png

2.58 KB
Loading

build/icons/icon-512x512.png

25.7 KB
Loading

build/icons/icon-64x64.png

3.12 KB
Loading

build/icons/icon-96x96.png

4.91 KB
Loading

0 commit comments

Comments
 (0)