Browse Source

Moved linux builds to circleci

pull/259/head
Samuel Attard 7 years ago
parent
commit
3610523eda
  1. 4
      .travis.yml
  2. 17
      circle.yml
  3. 21
      sig/publish-linux.js

4
.travis.yml

@ -1,6 +1,5 @@
os:
- osx
- linux
cache:
directories:
@ -21,8 +20,7 @@ branches:
script:
- npm run test
- npm run build
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]]; then ./sig/import.sh && npm run make:darwin && node ./sig/publish-mac.js; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]]; then npm run make:linux && node ./sig/publish-linux.js; fi
- if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then ./sig/import.sh && npm run make:darwin && node ./sig/publish-mac.js; fi
notifications:
webhooks:

17
circle.yml

@ -0,0 +1,17 @@
machine:
node:
version: 4.3.1
dependencies:
cache_directories:
- "~/.electron"
test:
override:
- npm run test
post:
- npm run make:linux
general:
artifacts:
- "dist"

21
sig/publish-linux.js

@ -1,21 +0,0 @@
'use strict';
const fs = require('fs');
const request = require('request');
const path = require('path');
console.log('Uploading ZIP artifact'); // eslint-disable-line
const req = request.post(`http://ip-linux.googleplaymusicdesktopplayer.com/upload/${process.env.TRAVIS_COMMIT}/${process.env.TRAVIS_BUILD_NUMBER}`, (err, resp, body) => {
if (err) {
console.log('Upload failed with error!'); // eslint-disable-line
console.log(err); // eslint-disable-line
} else {
console.log('Upload sucessfull'); // eslint-disable-line
console.log('URL: ' + body); // eslint-disable-line
}
});
const form = req.form();
form.append('zip', fs.createReadStream(path.resolve(`${__dirname}/../dist/installers/installers.zip`))); // eslint-disable-line
form.append('key', process.env.LINUX_ARTIFACT_KEY || '');
Loading…
Cancel
Save