From 347d27c12d4b145a87ecdf015a4f4d05257fa074 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Mon, 1 Feb 2016 15:27:16 -0600 Subject: [PATCH] chore(publish): rename prepare to prepublish, remove publish task --- gulpfile.js | 24 +++--------------------- scripts/README.md | 14 ++++++++------ 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 39e8ec076f..c2e1b33dbf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -468,7 +468,7 @@ gulp.task('package', ['src.release'], function(done){ }); -gulp.task('!prepare', function(){ +gulp.task('prepare', function(){ var execSync = require('child_process').execSync; var spawnSync = require('child_process').spawnSync; var semver = require('semver'); @@ -510,26 +510,8 @@ gulp.task('!prepare', function(){ }); -gulp.task('prepare', ['package', '!prepare']); - -gulp.task('publish', function(done){ - var spawn = require('child_process').spawn; - var fs = require('fs'); - - var npmCmd = spawn('npm', ['publish', './dist']); - - npmCmd.stdout.on('data', function (data) { - console.log(data.toString()); - }); - - npmCmd.stderr.on('data', function (data) { - console.log('npm err: ' + data.toString()); - }); - - npmCmd.on('close', function() { - done(); - }); - +gulp.task('prepublish', ['prepare'], function(done){ + runSequence('package', done); }); require('./scripts/docs/gulp-tasks')(gulp, flags) diff --git a/scripts/README.md b/scripts/README.md index 0e4a61622f..d31ce93c57 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -29,7 +29,7 @@ ### Building API Docs -1. `gulp docs` to build the nightly version +1. `gulp docs` to build the nightly version 2. `gulp docs --doc-version=2.0.0` to build a specific API version @@ -49,11 +49,13 @@ ### Releasing Ionic Source -1. Pull latest code -2. Run [snapshot](#running-snapshot) & update if necessary -3. Bump version in package.json -4. `gulp publish` -5. Sit back and have a beer :beer: (or wine :wine_glass:) +1. Run `gulp prepublish` + - Pulls latest, updates package.json minor version, updates changelog +2. Verify that changelog changes and package.json update are correct (`git status` && `git diff`) +3. Run [snapshot](#running-snapshot) & update if necessary +4. Publish to npm: `npm publish ./dist` +5. Commit and push +6. Sit back and have a beer :beer: (or wine :wine_glass:) ### Releasing Component Demos See [ionic-preview-app](https://github.com/driftyco/ionic-preview-app#updating-ionic-site)