Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Integrate in gulp task sequence; add CI check
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Zeug committed Jan 11, 2017
1 parent 85b652f commit 24d213d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,10 @@ gulp.task('upload-binaries', (cb) => {
// filter draft with current version's tag
.then((res) => {
let draft;

res.body.forEach((release) => {
if (release.tag_name.match(version) && release.draft === true) {
if (release.tag_name.match(version)
&& release.draft === true
) {
draft = release;
}
});
Expand All @@ -378,6 +379,8 @@ gulp.task('upload-binaries', (cb) => {
})
// upload binaries from release folders
.then((draft) => {
if (draft && draft.assets.length !== 0) throw new Error('Github release draft already contains assets; will not upload');

const dirs = ['dist_wallet/release', 'dist_mist/release'];
const files = [];
dirs.forEach((dir) => {
Expand All @@ -398,6 +401,8 @@ gulp.task('upload-binaries', (cb) => {
.catch((err) => {
if (err.message === "Cannot read property 'id' of undefined") {
console.log(Error(`Couldn't find github release draft for v${version} release tag`));
} else {
console.log(err);
}
});
});
Expand Down Expand Up @@ -444,9 +449,11 @@ gulp.task('download-signatures', (cb) => {
.catch(cb);
});

gulp.task('taskQueue', [
'release-dist',
]);
gulp.task('taskQueue', ['release-dist'], () => {
if (process.env.CI) {
runSeq('upload-binaries');
}
});

// MIST task
gulp.task('mist', (cb) => {
Expand Down

0 comments on commit 24d213d

Please sign in to comment.