Mailspring/appveyor.yml
Juan Tejada b8883cd2b7 [dev] Only bootstrap specific pkgs in postinstall for faster installs
Summary:
This commit makes it so postinstall.es6 only bootstraps the packages we
are interested in based on a new env variable, `INSTALL_TARGET`.

`INSTALL_TARGET` can be set to `cloud`, `client` or `all`, or not set at all,
and our postinstall will bootstrap the packages accordingly. This will make
build and deploy times faster.

Test Plan: manual

Reviewers: spang, halla, evan, khamidou

Reviewed By: evan, khamidou

Differential Revision: https://phab.nylas.com/D4271
2017-03-28 13:59:55 -07:00

47 lines
1.6 KiB
YAML

version: '{build}'
branches:
only:
- master
- /ci.*/
- /stable.*/
# We need to only clone the main module because our submodule requires the
# encrypted ssh key to access submodules
install:
- ps: Install-Product node $env:NODE_VERSION
- ps: nuget install secure-file -ExcludeVersion
- ps: npm config set msvs_version 2013
# We need to extract the encrypted private ssh key to clone the submodule.
- ps: |
if ($env:DECRYPTION_PASSWORD) {
secure-file\tools\secure-file -decrypt packages\client-private-plugins\encrypted_certificates\appveyor\win-nylas-n1.p12.enc -secret $env:DECRYPTION_PASSWORD
secure-file\tools\secure-file -decrypt packages\client-private-plugins\encrypted_certificates\appveyor\set_win_env.ps1.enc -secret $env:DECRYPTION_PASSWORD
. packages\client-private-plugins\encrypted_certificates\appveyor\set_win_env.ps1
}
build_script:
- cmd: npm install
deploy_script:
- ps: |
npm run build-client
node packages/client-app/build/create-signed-windows-installer.js
npm run upload-client
environment:
matrix:
- NODE_VERSION: 6.9
global:
DEBUG: "electron-windows-installer:*,electron-packager:*"
SIGN_BUILD: true
INSTALL_TARGET: "client"
CERTIFICATE_FILE: .\packages\client-private-plugins\encrypted_certificates\appveyor\win-nylas-n1.p12
DECRYPTION_PASSWORD:
secure: 48VSzDtdBd52Xlo3TZ1NeR1yRRrZ3AU6Px5XjD5RDp44cFU5GYVspecGqX6DGCV7i0D7nldGMyEbXNrjM1t1Kw==
cache:
- node_modules -> package.json
- packages\client-app\node_modules -> packages\client-app\package.json
- '%USERPROFILE%\.npm'