Add codesigning and fix packaging

This commit is contained in:
Thomas Nordquist
2019-03-05 11:12:56 +01:00
parent 38803ccf59
commit 197781a4d8
5 changed files with 12 additions and 26 deletions

View File

@@ -1,12 +1,5 @@
language: node_js language: node_js
deploy:
skip_cleanup: true
provider: script
script: echo $SNAP_TOKEN | snap run snapcraft login --with - && snap run snapcraft push build/clean/build/*.snap --release edge"
on:
branch: master
services: services:
- xvfb - xvfb
@@ -40,6 +33,5 @@ script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run -e GH_TOKEN=$GH_TOKEN -e GIT_TAG=$TRAVIS_TAG --rm -v `pwd`:/app uitest sh -c "cd app && docker/testMounted.sh"; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run -e GH_TOKEN=$GH_TOKEN -e GIT_TAG=$TRAVIS_TAG --rm -v `pwd`:/app uitest sh -c "cd app && docker/testMounted.sh"; fi
- if [[ "$TRAVIS_TAG" != "" ]]; then yarn run prepare-release; fi - if [[ "$TRAVIS_TAG" != "" ]]; then yarn run prepare-release; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package linux; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package linux; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then yarn run package snap; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- mac; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- mac; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- win; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- win; fi

View File

@@ -1,6 +1,6 @@
{ {
"name": "MQTT-Explorer", "name": "MQTT-Explorer",
"version": "0.2.1", "version": "0.2.1-alpha6",
"description": "Explore your message queues", "description": "Explore your message queues",
"main": "dist/src/electron.js", "main": "dist/src/electron.js",
"scripts": { "scripts": {

View File

@@ -7,7 +7,6 @@ const linuxAppImage: builder.CliOptions = {
ia32: true, ia32: true,
armv7l: true, armv7l: true,
arm64: false, arm64: false,
linux: ['AppImage'],
projectDir: './build/clean', projectDir: './build/clean',
publish: 'always', publish: 'always',
} }
@@ -17,7 +16,6 @@ const linuxSnap: builder.CliOptions = {
ia32: false, ia32: false,
armv7l: false, armv7l: false,
arm64: false, arm64: false,
linux: ['snap'],
projectDir: './build/clean', projectDir: './build/clean',
publish: 'always', publish: 'always',
} }
@@ -27,7 +25,6 @@ const winPortable: builder.CliOptions = {
ia32: true, ia32: true,
armv7l: false, armv7l: false,
arm64: false, arm64: false,
win: ['portable'],
projectDir: './build/clean', projectDir: './build/clean',
publish: 'always', publish: 'always',
} }
@@ -37,7 +34,6 @@ const winNsis: builder.CliOptions = {
ia32: true, ia32: true,
armv7l: false, armv7l: false,
arm64: false, arm64: false,
win: ['nsis'],
projectDir: './build/clean', projectDir: './build/clean',
publish: 'always', publish: 'always',
} }
@@ -47,9 +43,8 @@ const winAppx: builder.CliOptions = {
ia32: true, ia32: true,
armv7l: false, armv7l: false,
arm64: false, arm64: false,
win: ['appx'],
projectDir: './build/clean', projectDir: './build/clean',
publish: 'never', publish: 'onTag',
} }
const mac: builder.CliOptions = { const mac: builder.CliOptions = {
@@ -57,7 +52,6 @@ const mac: builder.CliOptions = {
ia32: true, ia32: true,
armv7l: false, armv7l: false,
arm64: false, arm64: false,
mac: ['dmg'],
projectDir: './build/clean', projectDir: './build/clean',
publish: 'always', publish: 'always',
} }
@@ -73,19 +67,15 @@ async function executeBuild() {
break break
case 'linux': case 'linux':
await buildWithOptions(linuxAppImage, { platform: 'linux', package: 'AppImage' }) await buildWithOptions(linuxAppImage, { platform: 'linux', package: 'AppImage' })
break
case 'snap':
try {
await buildWithOptions(linuxSnap, { platform: 'linux', package: 'snap' }) await buildWithOptions(linuxSnap, { platform: 'linux', package: 'snap' })
} catch {
// ignore
}
break break
case 'mac': case 'mac':
await buildWithOptions(mac, { platform: 'mac', package: 'mas' })
await buildWithOptions(mac, { platform: 'mac', package: 'dmg' }) await buildWithOptions(mac, { platform: 'mac', package: 'dmg' })
await buildWithOptions(mac, { platform: 'mac', package: 'zip' })
break break
default: default:
await buildWithOptions(mac, { platform: 'mac', package: 'dmg' }) throw new Error('No target selected')
} }
} }
@@ -96,7 +86,11 @@ export interface BuildInfo {
async function buildWithOptions(options: builder.CliOptions, buildInfo: BuildInfo) { async function buildWithOptions(options: builder.CliOptions, buildInfo: BuildInfo) {
fs.writeFileSync(path.join(options.projectDir!, 'buildOptions.json'), JSON.stringify(buildInfo)) fs.writeFileSync(path.join(options.projectDir!, 'buildOptions.json'), JSON.stringify(buildInfo))
await builder.build(options)
await builder.build({
...options,
[buildInfo.platform]: [buildInfo.package],
})
} }
function build() { function build() {

BIN
res/mac-certificates.p12 Normal file

Binary file not shown.

View File

@@ -57,7 +57,7 @@ async function doStuff() {
await sleep(1000) await sleep(1000)
await sleep(1000) await sleep(1000)
await showText('Topics overview', 2000, browser, 'top') await showText('Topic overview', 2000, browser, 'top')
await sleep(2000) await sleep(2000)
await showText('Indicate topic updates', 2000, browser, 'bottom') await showText('Indicate topic updates', 2000, browser, 'bottom')
await sleep(3000) await sleep(3000)