mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(CI): Updating ionicframework homepage automatically on release
This commit is contained in:
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user