forked from mozilla/botio-files-pdfjs
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathon_push.js
More file actions
28 lines (22 loc) · 666 Bytes
/
on_push.js
File metadata and controls
28 lines (22 loc) · 666 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 () {
// uber test
//
// Publish viewer to gh-pages
//
exec('gulp web', {async:true}, function() {
// This dir should have its own .git/
cd('build/gh-pages');
exec('git commit --amend --no-edit');
exec('git push --force origin gh-pages');
cd('../..');
}); // gulp web
}); // npm install