forked from HaikuTeam/animator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.js.handlebars
43 lines (40 loc) · 1.76 KB
/
_config.js.handlebars
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* SQUIRREL SETUP INFO:
* var env = { HAIKU_RELEASE_ENVIRONMENT HAIKU_RELEASE_BRANCH HAIKU_PLUMBING_VERSION }
* const opts = { environment: process.env.HAIKU_RELEASE_ENVIRONMENT, branch: process.env.HAIKU_RELEASE_BRANCH, platform: process.env.HAIKU_RELEASE_PLATFORM, }
* SQUIRREL CHECK URL:
* ${opts.server}/updates/latest?environment=${opts.environment}&branch=${opts.branch}&platform=${opts.platform}&version=${opts.version}
* RELEASE UPLOAD URL:
* https://s3.amazonaws.com/${bucket}/releases/${environment}/${branch}/${platform}/${countdown}/${version}/Haiku-${version}-${platform}.zip
*/
var env = {
NODE_ENV: '{{appenv}}',
HAIKU_RELEASE_VERSION: require('./package.json').version,
HAIKU_RELEASE_PLATFORM: '{{platform}}',
HAIKU_RELEASE_ARCHITECTURE: '{{architecture}}',
HAIKU_RELEASE_ENVIRONMENT: '{{appenv}}', // just a tag, really - use to push to a url that won't trigger an update to users on the mainline
HAIKU_RELEASE_BRANCH: '{{branch}}', // just a tag, really
HAIKU_PLUMBING_VERSION: '{{branch}}', // plumbing branch
HAIKU_PLUMBING_HOST: 'localhost',
HAIKU_SKIP_AUTOUPDATE: null, // '1' to skip the auto-update hook
HAIKU_AUTOUPDATE_SERVER: 'https://squirrel.haiku.ai',
NO_REMOTE_DEBUG: '1', // prevent debugger from crashing the app
}
for (var key in env) {
var value = env[key]
if (!value) continue
process.env[key] = value // important: sets values in child processes
if (process.env.HAIKU_APP_SKIP_LOG !== '1') {
console.log(key + '=' + JSON.stringify(value)) // important: provides values to shell scripts (hack!)
}
}
module.exports = {
uglify: {{uglify}},
branch: '{{branch}}',
append: '{{appenv}}',
environment: '{{environment}}',
upload: {{upload}},
shout: {{shout}},
platform: '{{platform}}',
architecture: '{{architecture}}'
}