mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-26 00:54:04 +08:00
Revert to Node 6.9+, Linux build failing with npm 4
This commit is contained in:
parent
160812900b
commit
b83a7fd426
2 changed files with 20 additions and 24 deletions
|
@ -3,7 +3,7 @@ sudo: false
|
|||
language: node_js
|
||||
|
||||
node_js:
|
||||
- '7.10'
|
||||
- '6.9'
|
||||
|
||||
addons:
|
||||
artifacts: true
|
||||
|
@ -49,12 +49,12 @@ script:
|
|||
addons:
|
||||
artifacts:
|
||||
working_dir: app/dist
|
||||
target_paths: builds/${TRAVIS_COMMIT:0:8}/${TRAVIS_OS_NAME}
|
||||
target_paths: client/${TRAVIS_COMMIT:0:8}/${TRAVIS_OS_NAME}
|
||||
paths:
|
||||
- Merani.dmg
|
||||
- Merani.zip
|
||||
- "*.rpm"
|
||||
- "*.deb"
|
||||
- $(ls . | grep ".deb")
|
||||
- $(ls . | grep ".rpm")
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
|
|
@ -34,26 +34,22 @@ function npm(cmd, options) {
|
|||
});
|
||||
}
|
||||
|
||||
async function go() {
|
||||
// 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 cacheElectronTarget = fs.existsSync(cacheVersionPath) && fs.readFileSync(cacheVersionPath).toString();
|
||||
// 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 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'));
|
||||
}
|
||||
|
||||
// run `npm install` in ./app with Electron NPM config
|
||||
await npm('install', {cwd: './app', env: 'electron'});
|
||||
|
||||
// run `npm dedupe` in ./app with Electron NPM config
|
||||
await npm('dedupe', {cwd: './app', env: 'electron'});
|
||||
|
||||
// write the marker with the electron version
|
||||
fs.writeFileSync(cacheVersionPath, npmElectronTarget);
|
||||
if (cacheElectronTarget !== npmElectronTarget) {
|
||||
console.log(`\n-- Clearing app/node_modules --`)
|
||||
rimraf.sync(path.resolve(__dirname, '..', 'app', 'node_modules'));
|
||||
}
|
||||
|
||||
go();
|
||||
// run `npm install` in ./app with Electron NPM config
|
||||
npm('install', {cwd: './app', env: 'electron'}).then(() =>
|
||||
// run `npm dedupe` in ./app with Electron NPM config
|
||||
npm('dedupe', {cwd: './app', env: 'electron'}).then(() =>
|
||||
// write the marker with the electron version
|
||||
fs.writeFileSync(cacheVersionPath, npmElectronTarget)
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue