Skip to content

Commit 9ed5f45

Browse files
feat: clear CHANGELOG.md and local Git tags in setup (#125)
1 parent 1548146 commit 9ed5f45

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Changelog
2+
13
### [1.20.2](https://github.com/JoshuaKGoldberg/template-typescript-node-package/compare/v1.20.1...v1.20.2) (2022-12-15)
24

35
### Bug Fixes
@@ -35,8 +37,6 @@
3537

3638
- 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))
3739

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

4242
### Features

script/setup.js

+18-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ try {
122122
[/"setup": ".*",/, ``, "./package.json"],
123123
[
124124
`"version": "${existingPackage.version}"`,
125-
`"version": "0.0.1"`,
125+
`"version": "0.0.0"`,
126126
"./package.json",
127127
],
128128
[/## Explainer.*## Usage/s, `## Usage`, "./README.md"],
@@ -141,6 +141,23 @@ try {
141141

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

144+
console.log();
145+
console.log(chalk.gray`Clearing CHANGELOG.md...`);
146+
147+
await fs.writeFile(
148+
"./CHANGELOG.md",
149+
prettier.format(`# Changelog`, { parser: "markdown" })
150+
);
151+
152+
console.log(chalk.gray`✔️ Done.`);
153+
154+
console.log();
155+
console.log(chalk.gray`Deleting local git tags...`);
156+
157+
await $`git tag -d $(git tag -l)`;
158+
159+
console.log(chalk.gray`✔️ Done.`);
160+
144161
console.log();
145162
console.log(chalk.gray`Hydrating repository labels...`);
146163

0 commit comments

Comments
 (0)