Order of operations is now:
- regenerate local assets
- clean the release dir
- download linux/windows releases
- build osx release
- smoke all test releases
// FREEBIE
npm run icon-gen and grunt (run default task) can be grouped into one
operation.
Use SIGNAL_ENV instead of NODE_ENV since Setting NODE_ENV adversely
affects yarn's install behavior, so we had to set it after the install
and before the build. By using a custom variable instead, we can set it
globally and eventually use it in a build matrix.
Move mas build to its own npm script
// FREEBIE
These modules together allow us to import css files from third party
components without maintaining symlinks that essentially rename them as
sass partials, which doesn't work on windows.
// FREEBIE
This corresponds to CFBundleVersion in the mac build. It must be
incremented every time we upload a new build to the app store for the
current release version.
// FREEBIE
Either icon-gen or local scaling of images was producing a corrupted and
glitchy .icns file. With this module, we need only provide a 1024px
image and it handles the scaling and generation of all other icon
assets.
// FREEBIE
Add the buildExpiration config and add it to the renderer's config
object. Use grunt to write the build expiration to
config/local-production.json which will override the default value (no
expiration) in production. Finally, run this grunt task as part of the
build process.
// FREEBIE
Add environment-specific configs under `./config` and integrate with the
build system. Also changes package.json `files` from blacklist to
whitelist.
// FREEBIE
Spaces in the file name get escaped to %20. Then the percent sign gets
escaped again on the way to s3 upload, such that the object name on s3
ends up as %2520. To fix this, we can simply omit spaces from our
artifact names.
// FREEBIE
Move these to where the build expects them to be.
In theory electron-builder should generate these from a build/icon.icns
but that doesn't seem to be working.
// FREEBIE
`npm run icon-gen` builds icon files from png files in the images
directory, outputting to build/icon.{ico,icns} (the expected location
for electron-builder).
// FREEBIE
Set NODE_ENV at run time or build time to switch the app between dev and
production modes.
At build time, the current NODE_ENV will be included in the packaged
app's package.json file. At runtime we read NODE_ENV from package.json,
but also allow the local environment variable to override. A query
string parsed by a preload script exposes the value to the renderer,
which then determines whether we use the staging or production server.
Additionally, different environments have different user data
directories.
// FREEBIE