Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only publish to NPM on release. #22

Merged
merged 1 commit into from
Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions on_push.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,10 @@ exec('npm install', {async:true}, function () {
exec('gulp web', {async:true}, function() {

// This dir should have its own .git/
cd('build/gh-pages');
cd('build/gh-pages');
exec('git commit --amend --no-edit');
exec('git push --force origin gh-pages');
cd('../..');

//
// Publish library to pdfjs-dist
//
exec('gulp dist', {async:true}, function() {

cd('build/dist');
exec('git push --tags git@github.com:mozilla/pdfjs-dist.git master');
exec('npm publish');
cd('../..');

}); // gulp dist
}); // gulp web
}); // npm install
25 changes: 25 additions & 0 deletions on_release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
var botio = require(process.env['BOTIO_MODULE']);
var path = require('path');
require('shelljs/global');

try {
var jobInfo = JSON.parse(process.env['BOTIO_JOBINFO']);
var reason = 'See mozilla/pdf.js@' + jobInfo.head_sha;
process.env['PDFJS_UPDATE_REASON'] = reason;
echo('>> Setting reason to: ' + reason);
} catch (_) {}

exec('npm install', {async:true}, function () {

//
// Publish library to pdfjs-dist
//
exec('gulp dist', {async:true}, function() {

cd('build/dist');
exec('git push --tags git@github.com:mozilla/pdfjs-dist.git master');
exec('npm publish' + (jobInfo.prerelease ? ' --tag next' : ''));
cd('../..');

}); // gulp dist
}); // npm install