Skip to content

Commit

Permalink
feat: clear CHANGELOG.md and local Git tags in setup (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg authored Dec 15, 2022
1 parent 1548146 commit 9ed5f45
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Changelog

### [1.20.2](https://github.com/JoshuaKGoldberg/template-typescript-node-package/compare/v1.20.1...v1.20.2) (2022-12-15)

### Bug Fixes
Expand Down Expand Up @@ -35,8 +37,6 @@

- switch from semantic-release to release-it ([#110](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues/110)) ([c0fcbf4](https://github.com/JoshuaKGoldberg/template-typescript-node-package/commit/c0fcbf46718ee6ad0e3582b1f01e2910a3da847d))

# Changelog

## [1.7.0](https://github.com/JoshuaKGoldberg/template-typescript-node-package/compare/v1.6.0...v1.7.0) (2022-12-14)

### Features
Expand Down
19 changes: 18 additions & 1 deletion script/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ try {
[/"setup": ".*",/, ``, "./package.json"],
[
`"version": "${existingPackage.version}"`,
`"version": "0.0.1"`,
`"version": "0.0.0"`,
"./package.json",
],
[/## Explainer.*## Usage/s, `## Usage`, "./README.md"],
Expand All @@ -141,6 +141,23 @@ try {

console.log(chalk.gray`✔️ Done.`);

console.log();
console.log(chalk.gray`Clearing CHANGELOG.md...`);

await fs.writeFile(
"./CHANGELOG.md",
prettier.format(`# Changelog`, { parser: "markdown" })
);

console.log(chalk.gray`✔️ Done.`);

console.log();
console.log(chalk.gray`Deleting local git tags...`);

await $`git tag -d $(git tag -l)`;

console.log(chalk.gray`✔️ Done.`);

console.log();
console.log(chalk.gray`Hydrating repository labels...`);

Expand Down

0 comments on commit 9ed5f45

Please sign in to comment.