Add script to generate a new release and publish it on GitHub Pages
This commit is contained in:
Родитель
960c7f030d
Коммит
b268df01b8
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "stab-crashes",
|
||||
"version": "1.0.0",
|
||||
"description": "Stability dashboard",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"fs-extra": "^0.30.0",
|
||||
"gh-pages": "^0.11.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mozilla/stab-crashes.git"
|
||||
},
|
||||
"author": "Marco Castelluccio <marco@mozilla.com>",
|
||||
"license": "MPL-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mozilla/stab-crashes/issues"
|
||||
},
|
||||
"homepage": "https://github.com/mozilla/stab-crashes#readme"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
var ghpages = require('gh-pages');
|
||||
var path = require('path');
|
||||
var fs = require('fs-extra');
|
||||
|
||||
fs.removeSync('dist');
|
||||
fs.mkdirSync('dist');
|
||||
[
|
||||
'index.html', 'dash.js', 'style.css',
|
||||
'exclamation_mark.svg', 'question_mark.svg', 'rocket_fly.png',
|
||||
'release.json', 'release-startup.json', 'beta.json', 'beta-startup.json', 'aurora.json', 'aurora-startup.json',
|
||||
].forEach(file => fs.copySync(file, path.join('dist', file)));
|
||||
|
||||
ghpages.publish('dist', err => {
|
||||
if (err) {
|
||||
console.error('Error while publishing to gh-pages');
|
||||
console.error(err);
|
||||
}
|
||||
});
|
Загрузка…
Ссылка в новой задаче