Skip to content

Commit c1d82f4

Browse files
committed
fix(build): update the gulpfile nightly to only update the distributed package.json file
1 parent e27452b commit c1d82f4

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

gulpfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,11 +864,12 @@ gulp.task('publish.nightly', ['build.release'], function(done){
864864

865865
/**
866866
* Publishes a new tag to npm with a nightly tag.
867+
* This will only update the dist package.json file.
867868
*/
868869
gulp.task('nightly', ['package'], function(done) {
869870
var fs = require('fs');
870871
var spawn = require('child_process').spawn;
871-
var packageJSON = require('./package.json');
872+
var packageJSON = require('./dist/package.json');
872873
var hashLength = 8;
873874

874875
// Generate a unique hash based on current timestamp
@@ -890,10 +891,9 @@ gulp.task('nightly', ['package'], function(done) {
890891
.concat(createUniqueHash())
891892
.join('-');
892893

893-
fs.writeFileSync('./package.json', JSON.stringify(packageJSON, null, 2));
894+
fs.writeFileSync('./dist/package.json', JSON.stringify(packageJSON, null, 2));
894895

895896
var npmCmd = spawn('npm', ['publish', '--tag=nightly', './dist']);
896-
897897
npmCmd.stdout.on('data', function (data) {
898898
console.log(data.toString());
899899
});

scripts/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ From your app directory:
4242

4343
To remove the linked version of `ionic-angular` do `npm rm ionic-angular`, and then reinstall using `npm install ionic-angular`.
4444

45+
### Publish a nightly release
46+
1. Run `gulp publish.nightly`
47+
- Pulls latest
48+
- builds npm package files into dist
49+
- updates package.json to a nightly version for publish: 0.1.0-beta.0 results in 0.1.0-beta.0-r8e7684t
50+
- publishes to NPM using the nightly tag
51+
2. `npm install ionic-angular@nightly` will now install the latest nightly release
52+
4553

4654
### Running Snapshot
4755

0 commit comments

Comments
 (0)