Files
test-repo/scripts/release/steps/update-version.js
T
Ika 8973caf4bb chore: improve release scripts (#4933)
- use the latest git tag as the previous version
- restore/bump the version on master in `bump-prettier.js`
- use `stdio: "inherit"` for `npm publish` so that we could input the OTP
- do not use `--runInBand` for local `test:dist`
- remove `Updating integration snapshots`
- remove `Attach all files in dist/ folder`
2018-08-08 23:49:22 +08:00

22 lines
670 B
JavaScript

"use strict";
const { logPromise, readJson, writeJson, processFile } = require("../utils");
async function bump({ version }) {
const pkg = await readJson("package.json");
pkg.version = version;
await writeJson("package.json", pkg, { spaces: 2 });
// Update github issue templates
processFile(".github/ISSUE_TEMPLATE/formatting.md", content =>
content.replace(/^(\*\*Prettier ).*?(\*\*)$/m, `$1${version}$2`)
);
processFile(".github/ISSUE_TEMPLATE/integration.md", content =>
content.replace(/^(- Prettier Version: ).*?$/m, `$1${version}`)
);
}
module.exports = async function(params) {
await logPromise("Bumping version", bump(params));
};