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' - '6.9'
addons: addons:
artifacts: true - artifacts: true
apt: - apt:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
packages: packages:
- build-essential - build-essential
- clang - clang
- fakeroot - fakeroot
- g++-4.8 - g++-4.8
- git - git
- libgnome-keyring-dev - libgnome-keyring-dev
- xvfb - xvfb
- rpm - rpm
- libxext-dev - libxext-dev
- libxtst-dev - libxtst-dev
- libxkbfile-dev - libxkbfile-dev
branches: branches:
only: only:

View file

@ -37,12 +37,13 @@ function npm(cmd, options) {
// For speed, we cache app/node_modules. However, we need to // For speed, we cache app/node_modules. However, we need to
// be sure to do a full rebuild of native node modules when the // be sure to do a full rebuild of native node modules when the
// Electron version changes. To do this we check a marker file. // 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(); const cacheElectronTarget = fs.existsSync(cacheVersionPath) && fs.readFileSync(cacheVersionPath).toString();
if (cacheElectronTarget !== npmElectronTarget) { if (cacheElectronTarget !== npmElectronTarget) {
console.log(`\n-- Clearing app/node_modules --`) 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 // run `npm install` in ./app with Electron NPM config