chore(CI): Updating ionicframework homepage automatically on release

This commit is contained in:
perry
2017-04-19 11:16:42 -05:00
parent fd3c6baec7
commit afc9b36c5d
3 changed files with 19 additions and 0 deletions

View File

@ -10,6 +10,8 @@ import { valid }from 'semver';
import { argv } from 'yargs';
import { DIST_DEMOS_ROOT } from '../constants';
import { SITE_ROOT } from '../constants';
import { PROJECT_ROOT } from '../constants';
task('docs', ['docs.dgeni', 'docs.demos', 'docs.sassVariables']);
@ -136,3 +138,16 @@ task('docs.sassVariables', () => {
writeFileSync(outputFile, JSON.stringify(variables));
}));
});
task('docs.homepageVersionUpdate', () => {
// This assumes you're currently releasing
const sourcePackageJSON = require(`${PROJECT_ROOT}/package.json`);
let now = new Date();
const frameworkInfo = JSON.stringify({
version: sourcePackageJSON.version,
date: now.toISOString().split('T')[0]
}, null, 2);
writeFileSync(`${SITE_ROOT}/server/data/framework-info.json`, frameworkInfo);
});