From c1d82f49fc9816f9523903448a4849cf23e39759 Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Thu, 14 Apr 2016 09:44:58 -0500 Subject: [PATCH] fix(build): update the gulpfile nightly to only update the distributed package.json file --- gulpfile.js | 6 +++--- scripts/README.md | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index a57798c09a..060f438acc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -864,11 +864,12 @@ gulp.task('publish.nightly', ['build.release'], function(done){ /** * Publishes a new tag to npm with a nightly tag. + * This will only update the dist package.json file. */ gulp.task('nightly', ['package'], function(done) { var fs = require('fs'); var spawn = require('child_process').spawn; - var packageJSON = require('./package.json'); + var packageJSON = require('./dist/package.json'); var hashLength = 8; // Generate a unique hash based on current timestamp @@ -890,10 +891,9 @@ gulp.task('nightly', ['package'], function(done) { .concat(createUniqueHash()) .join('-'); - fs.writeFileSync('./package.json', JSON.stringify(packageJSON, null, 2)); + fs.writeFileSync('./dist/package.json', JSON.stringify(packageJSON, null, 2)); var npmCmd = spawn('npm', ['publish', '--tag=nightly', './dist']); - npmCmd.stdout.on('data', function (data) { console.log(data.toString()); }); diff --git a/scripts/README.md b/scripts/README.md index 6c93576df2..1c34d0a091 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -42,6 +42,14 @@ From your app directory: To remove the linked version of `ionic-angular` do `npm rm ionic-angular`, and then reinstall using `npm install ionic-angular`. +### Publish a nightly release +1. Run `gulp publish.nightly` + - Pulls latest + - builds npm package files into dist + - updates package.json to a nightly version for publish: 0.1.0-beta.0 results in 0.1.0-beta.0-r8e7684t + - publishes to NPM using the nightly tag +2. `npm install ionic-angular@nightly` will now install the latest nightly release + ### Running Snapshot