Skip to content

Commit d2b583d

Browse files
committed
test afterAllArtifactBuild script
1 parent 3eb9a23 commit d2b583d

File tree

5 files changed

+32
-10
lines changed

5 files changed

+32
-10
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ language: node_js
44
node_js:
55
- "10"
66
env:
7-
- BUILD_TYPE=full ELECTRON_CACHE=$HOME/.electron
87
- BUILD_TYPE=trial ELECTRON_CACHE=$HOME/.electron
8+
- BUILD_TYPE=full ELECTRON_CACHE=$HOME/.electron
99
cache:
1010
directories:
1111
- node_modules

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ branches:
2020
- beforeStickyTable
2121
environment:
2222
matrix:
23-
- rando: onething
24-
BUILD_TYPE: full
25-
2623
- rando: anotherthing
2724
BUILD_TYPE: trial
25+
26+
- rando: onething
27+
BUILD_TYPE: full

bin/main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,6 @@ function openWindow (fileName, newFile = false) {
515515
}
516516
})
517517

518-
newWindow.webContents.on('will-navigate', (event, string) => {
519-
console.log("WILL NAVIGATE", string)
520-
log.warn("WILL NAVIGATE")
521-
})
522-
523518
if (process.env.NODE_ENV === 'dev') {
524519
newWindow.openDevTools()
525520
}

build/afterAllArtifactBuild.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// if it's a trial build
2+
// change the names of latest.yml and latest-mac.yml
3+
//
4+
// buildResult:
5+
// interface BuildResult {
6+
// outDir: string
7+
// artifactPaths: Array<string>
8+
// platformToTargets: Map<Platform, Map<string, Target>>
9+
// configuration: Configuration
10+
// }
11+
const fs = require('fs')
12+
13+
exports.default = function (buildResult) {
14+
console.log("CUSTOM FUNCTION afterAllArtifactBuild")
15+
console.log("BUILD TYPE", process.env.BUILD_TYPE)
16+
console.log("outDir", buildResult.outDir)
17+
console.log("artifactPaths", buildResult.artifactPaths)
18+
console.log("platforms", Object.keys(buildResult.platformToTargets))
19+
console.log("first platform", Object.keys(buildResult.platformToTargets)[0])
20+
let platform = Object.keys(buildResult.platformToTargets)[0]
21+
if (process.env.BUILD_TYPE === 'trial' && platform === 'win32') {
22+
fs.renameSync('latest.yml', 'latest-trial.yml')
23+
} else {
24+
fs.renameSync('latest-mac.yml', 'latest-mac-trial.yml')
25+
}
26+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"repository": "https://github.com/cameronsutter/plottr_electron.git",
55
"private": true,
66
"readme": "Copyright 2016 C. Louis S. (Cameron Sutter)",
7-
"version": "1.4.25",
7+
"version": "1.4.26",
88
"author": {
99
"name": "C. Louis S.",
1010
"email": "[email protected]",
@@ -109,6 +109,7 @@
109109
}
110110
],
111111
"afterSign": "build/notarize.js",
112+
"afterAllArtifactBuild": "build/afterAllArtifactBuild.js",
112113
"mac": {
113114
"category": "public.app-category.productivity",
114115
"target": [

0 commit comments

Comments
 (0)