mirror of
https://github.com/HackPlan/polaris-react.git
synced 2026-04-29 01:35:39 +08:00
* Stop ignoring /tests and /playground as plugins no longer crash on those files * Remove folder-specific eslint files as they don't do anything * Use `eslint-ignore no-console` at the top of scripts to avoid having to add it to every line * Add an override targeting the playground to avoid needing to include the eslint-disable in the file (and thus in the PR template)
22 lines
732 B
JavaScript
22 lines
732 B
JavaScript
/* eslint-disable no-console */
|
|
|
|
const {execSync} = require('child_process');
|
|
const {writeFileSync, readFileSync} = require('fs-extra');
|
|
const {resolve} = require('path');
|
|
const {version: newVersion} = require('../package.json');
|
|
const {semverRegExp, readmes} = require('./utilities');
|
|
|
|
const root = resolve(__dirname, '..');
|
|
|
|
console.log(`🆕 Updating version in ${readmes.join(', ')}...`);
|
|
readmes.map((readme) => resolve(root, readme)).forEach((file) => {
|
|
writeFileSync(
|
|
file,
|
|
readFileSync(file, 'utf8').replace(semverRegExp, newVersion),
|
|
);
|
|
});
|
|
|
|
console.log(`🏃♂️ Running \`git add -A ${readmes.join(' ')}\`...`);
|
|
const execOpts = {stdio: 'inherit'};
|
|
execSync(`git add -A ${readmes.join(' ')}`, execOpts);
|