Fix .travis.yml formatting, was not installing apt packages

This commit is contained in:
Ben Gotow 2017-08-10 23:31:37 -07:00
parent b83a7fd426
commit 643a589974
2 changed files with 19 additions and 18 deletions

View file

@ -6,22 +6,22 @@ node_js:
- '6.9'
addons:
artifacts: true
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- build-essential
- clang
- fakeroot
- g++-4.8
- git
- libgnome-keyring-dev
- xvfb
- rpm
- libxext-dev
- libxtst-dev
- libxkbfile-dev
- artifacts: true
- apt:
sources:
- ubuntu-toolchain-r-test
packages:
- build-essential
- clang
- fakeroot
- g++-4.8
- git
- libgnome-keyring-dev
- xvfb
- rpm
- libxext-dev
- libxtst-dev
- libxkbfile-dev
branches:
only:

View file

@ -37,12 +37,13 @@ function npm(cmd, options) {
// For speed, we cache app/node_modules. However, we need to
// be sure to do a full rebuild of native node modules when the
// Electron version changes. To do this we check a marker file.
const cacheVersionPath = './app/node_modules/.postinstall-target-version';
const appModulesPath = path.resolve(__dirname, '..', 'app', 'node_modules');
const cacheVersionPath = path.join(appModulesPath, '.postinstall-target-version');
const cacheElectronTarget = fs.existsSync(cacheVersionPath) && fs.readFileSync(cacheVersionPath).toString();
if (cacheElectronTarget !== npmElectronTarget) {
console.log(`\n-- Clearing app/node_modules --`)
rimraf.sync(path.resolve(__dirname, '..', 'app', 'node_modules'));
rimraf.sync(appModulesPath);
}
// run `npm install` in ./app with Electron NPM config