Skip to content

Commit

Permalink
Added Gulp packages
Browse files Browse the repository at this point in the history
  • Loading branch information
nwittwer committed Jan 29, 2019
1 parent 6337dee commit 555d8cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 50 deletions.
49 changes: 0 additions & 49 deletions gulp-tasks/tasks/build-app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const fs = require('fs')
const gulp = require('gulp')
const gutil = require('gulp-util')
const replace = require('gulp-replace')
const inquirer = require('inquirer')
const merge = require('merge-stream')
const exec = require('child_process').exec
const chalk = require('chalk')
const release = require('gulp-github-release')
const notify = require('gulp-notify')
const archiver = require('archiver')
const opn = require('opn')

// Update process.env based on .env file (in root directory)
Expand Down Expand Up @@ -114,50 +110,6 @@ gulp.task('deploy-app:changelog', function (cb) {
});
});

// Create a ZIP of executable file
gulp.task('deploy-app:zip-app', function (done) {
// create a file to stream archive data to.
var output = fs.createWriteStream(PATH_TO_MAC_ZIP);
var archive = archiver('zip', {
zlib: {
level: 9 // Sets the compression level.
}
});

// listen for all archive data to be written
// 'close' event is fired only when a file descriptor is involved
output.on('close', function () {
console.log(chalk.yellow('ZIP created: ' + archive.pointer() + ' total bytes'));
console.log(chalk.yellow(`🚀 Setting up the Github release...`));
done();
});

// Catch warnings
archive.on('warning', function (err) {
if (err.code === 'ENOENT') {
// log warning
console.log(err);
} else {
// throw error
throw err;
}
});

// Catch error
archive.on('error', function (err) {
throw err;
});

// Pipe archive data to the file
archive.pipe(output);

// Path to the app, app name
archive.directory('ship/Shift/osx64/Shift.app/', 'Shift.app');

// Finish the ZIP
archive.finalize();
});

// Creates a draft release on Github
// 1. Open the file: `.env` (root directory of this project)
// 2. You can create a Github token here: https://github.com/settings/tokens
Expand Down Expand Up @@ -204,7 +156,6 @@ gulp.task('build-app', gulp.series(
gulp.task('deploy-app', gulp.series(
'deploy-app:prompt-version-diff',
'deploy-app:changelog',
'deploy-app:zip-app',
'deploy-app:draft-release',
'deploy-app:open-release-in-browser'
));
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"babel-register": "^6.26.0",
"babili-webpack-plugin": "^0.1.2",
"cfonts": "^2.1.2",
"chalk": "^2.4.1",
"chalk": "^2.4.2",
"copy-webpack-plugin": "^4.5.1",
"cross-env": "^5.1.6",
"css-loader": "^0.28.11",
Expand All @@ -113,13 +113,19 @@
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"file-loader": "^1.1.11",
"gulp": "^4.0.0",
"gulp-github-release": "^1.2.1",
"gulp-hub": "^4.2.0",
"gulp-notify": "^3.2.0",
"gulp-replace": "^1.0.0",
"html-webpack-plugin": "^3.2.0",
"jest": "^24.0.0",
"jest-vue-preprocessor": "^1.4.0",
"mini-css-extract-plugin": "0.4.0",
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"node-sass": "^4.9.2",
"opn": "^5.4.0",
"sass-loader": "^7.0.3",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
Expand Down

0 comments on commit 555d8cc

Please sign in to comment.