mirror of
https://github.com/go-task/task.git
synced 2025-12-16 19:57:43 +01:00
fix(release): wrap changelog with v-pre directive (#2526)
This commit is contained in:
@@ -121,11 +121,15 @@ func changelog(version *semver.Version) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wrap the changelog content with v-pre directive for VitePress to prevent
|
||||||
|
// Vue from interpreting template syntax like {{.TASK_VERSION}}
|
||||||
|
changelogWithVPre := strings.Replace(changelog, "# Changelog\n\n", "# Changelog\n\n::: v-pre\n\n", 1) + "\n:::"
|
||||||
|
|
||||||
// Add the frontmatter to the changelog
|
// Add the frontmatter to the changelog
|
||||||
changelog = fmt.Sprintf("---\n%s\n---\n\n%s", frontmatter, changelog)
|
changelogWithFrontmatter := fmt.Sprintf("---\n%s\n---\n\n%s", frontmatter, changelogWithVPre)
|
||||||
|
|
||||||
// Write the changelog to the target file
|
// Write the changelog to the target file
|
||||||
return os.WriteFile(changelogTarget, []byte(changelog), 0o644)
|
return os.WriteFile(changelogTarget, []byte(changelogWithFrontmatter), 0o644)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setVersionFile(fileName string, version *semver.Version) error {
|
func setVersionFile(fileName string, version *semver.Version) error {
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ outline: deep
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
::: v-pre
|
||||||
|
|
||||||
## v3.45.5 - 2025-11-11
|
## v3.45.5 - 2025-11-11
|
||||||
|
|
||||||
- Fixed bug that made a generic message, instead of an useful one, appear when a
|
- Fixed bug that made a generic message, instead of an useful one, appear when a
|
||||||
@@ -181,7 +183,7 @@ Reverted the changes made in #2113 and #2186 that affected the
|
|||||||
- The default taskfile (output when using the `--init` flag) is now an embedded
|
- The default taskfile (output when using the `--init` flag) is now an embedded
|
||||||
file in the binary instead of being stored in the code (#2112 by @pd93).
|
file in the binary instead of being stored in the code (#2112 by @pd93).
|
||||||
- Improved the way we report the Task version when using the `--version` flag or
|
- Improved the way we report the Task version when using the `--version` flag or
|
||||||
<span v-pre>`{{.TASK_VERSION}}`</span> variable. This should now be more
|
`{{.TASK_VERSION}}` variable. This should now be more
|
||||||
consistent and easier for package maintainers to use (#2131 by @pd93).
|
consistent and easier for package maintainers to use (#2131 by @pd93).
|
||||||
- Fixed a bug where globstar (`**`) matching in `sources` only resolved the
|
- Fixed a bug where globstar (`**`) matching in `sources` only resolved the
|
||||||
first result (#2073, #2075 by @pd93).
|
first result (#2073, #2075 by @pd93).
|
||||||
@@ -642,8 +644,8 @@ stabilize the API in the future. #121 now tracks this piece of work.
|
|||||||
- Fix a missing a line break on log when using `--watch` mode (#1285, #1297 by
|
- Fix a missing a line break on log when using `--watch` mode (#1285, #1297 by
|
||||||
@FilipSolich).
|
@FilipSolich).
|
||||||
- Fix `defer` on JSON Schema (#1288 by @calvinmclean and @andreynering).
|
- Fix `defer` on JSON Schema (#1288 by @calvinmclean and @andreynering).
|
||||||
- Fix bug in usage of special variables like
|
- Fix bug in usage of special variables like `{{.USER_WORKING_DIR}}` in
|
||||||
<span v-pre>`{{.USER_WORKING_DIR}}`</span> in combination with `includes`
|
combination with `includes`
|
||||||
(#1046, #1205, #1250, #1293, #1312, #1274 by @andarto, #1309 by
|
(#1046, #1205, #1250, #1293, #1312, #1274 by @andarto, #1309 by
|
||||||
@andreynering).
|
@andreynering).
|
||||||
- Fix bug on `--status` flag. Running this flag should not have side-effects: it
|
- Fix bug on `--status` flag. Running this flag should not have side-effects: it
|
||||||
@@ -750,11 +752,10 @@ it a go and let us know what you think via a
|
|||||||
- Added task location data to the `--json` flag output (#1056 by @pd93)
|
- Added task location data to the `--json` flag output (#1056 by @pd93)
|
||||||
- Change the name of the file generated by `task --init` from `Taskfile.yaml` to
|
- Change the name of the file generated by `task --init` from `Taskfile.yaml` to
|
||||||
`Taskfile.yml` (#1062 by @misitebao).
|
`Taskfile.yml` (#1062 by @misitebao).
|
||||||
- Added new `splitArgs` template function
|
- Added new `splitArgs` template function (`{{splitArgs "foo bar 'foo bar
|
||||||
(<span v-pre>`{{splitArgs "foo bar 'foo bar baz'"}}`</span>) to ensure string
|
baz'"}}`) to ensure string is split as arguments (#1040, #1059 by
|
||||||
is split as arguments (#1040, #1059 by @dhanusaputra).
|
@dhanusaputra).
|
||||||
- Fix the value of <span v-pre>`{{.CHECKSUM}}`</span> variable in status (#1076,
|
- Fix the value of `{{.CHECKSUM}}` variable in status (#1076, #1080 by @pd93).
|
||||||
#1080 by @pd93).
|
|
||||||
- Fixed deep copy implementation (#1072 by @pd93)
|
- Fixed deep copy implementation (#1072 by @pd93)
|
||||||
- Created a tool to assist with releases (#1086 by @pd93).
|
- Created a tool to assist with releases (#1086 by @pd93).
|
||||||
|
|
||||||
@@ -962,8 +963,8 @@ it a go and let us know what you think via a
|
|||||||
|
|
||||||
- Add logging in verbose mode for when a task starts and finishes (#533, #588).
|
- Add logging in verbose mode for when a task starts and finishes (#533, #588).
|
||||||
- Fix an issue with preconditions and context errors (#597, #598).
|
- Fix an issue with preconditions and context errors (#597, #598).
|
||||||
- Quote each <span v-pre>`{{.CLI_ARGS}}`</span> argument to prevent one with
|
- Quote each `{{.CLI_ARGS}}` argument to prevent one with spaces to become many
|
||||||
spaces to become many (#613).
|
(#613).
|
||||||
- Fix nil pointer when `cmd:` was left empty (#612, #614).
|
- Fix nil pointer when `cmd:` was left empty (#612, #614).
|
||||||
- Upgrade [mvdan/sh](https://github.com/mvdan/sh) which contains two relevant
|
- Upgrade [mvdan/sh](https://github.com/mvdan/sh) which contains two relevant
|
||||||
fixes:
|
fixes:
|
||||||
@@ -978,9 +979,9 @@ it a go and let us know what you think via a
|
|||||||
|
|
||||||
## v3.9.0 - 2021-10-02
|
## v3.9.0 - 2021-10-02
|
||||||
|
|
||||||
- A new `shellQuote` function was added to the template system
|
- A new `shellQuote` function was added to the template system (`{{shellQuote
|
||||||
(<span v-pre>`{{shellQuote "a string"}}`</span>) to ensure a string is safe
|
"a string"}}`) to ensure a string is safe for use in shell
|
||||||
for use in shell ([mvdan/sh#727](https://github.com/mvdan/sh/pull/727),
|
([mvdan/sh#727](https://github.com/mvdan/sh/pull/727),
|
||||||
[mvdan/sh#737](https://github.com/mvdan/sh/pull/737),
|
[mvdan/sh#737](https://github.com/mvdan/sh/pull/737),
|
||||||
[Documentation](https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/syntax#Quote))
|
[Documentation](https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/syntax#Quote))
|
||||||
- In this version [mvdan.cc/sh](https://github.com/mvdan/sh) was upgraded with
|
- In this version [mvdan.cc/sh](https://github.com/mvdan/sh) was upgraded with
|
||||||
@@ -1365,3 +1366,5 @@ document, since it describes in depth what changed for this version.
|
|||||||
## v1.0.0 - 2017-02-28
|
## v1.0.0 - 2017-02-28
|
||||||
|
|
||||||
- Add LICENSE file
|
- Add LICENSE file
|
||||||
|
|
||||||
|
:::
|
||||||
|
|||||||
Reference in New Issue
Block a user