diff --git a/docs/bumping-files.md b/docs/bumping-files.md index 2a07c6c4..461dc045 100644 --- a/docs/bumping-files.md +++ b/docs/bumping-files.md @@ -26,6 +26,22 @@ Please review our comprehensive [guide](./reference/config.md#bumps) on configur ❤️ to the [github.com/tidwall/sjson](https://github.com/tidwall/sjson) library. +## Glob Support + +If you need to bump multiple similar files at the same time, you can specify a file path using a Glob pattern. + +```yaml linenums="1" +# .uplift.yml + +bumps: + - file: "**/package.json" + json: + - path: "version" + semver: true +``` + +❤️ to the [github.com/goreleaser/fileglob](https://github.com/goreleaser/fileglob) library. + ## The $VERSION Token Writing a regex can be challenging at most times, so Uplift provides the `$VERSION` token for matching a semantic version with an optional `v` prefix. You can include this in any pattern you define within your config. diff --git a/docs/reference/config.md b/docs/reference/config.md index 22beb748..1e8e5b71 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -7,7 +7,7 @@ You are free to control Uplift through the use of a dedicated configuration file - `uplift.yml` - `uplift.yaml` -## env +## env ```{ .yaml .annotate linenums="1" } # Define a set of environment variables that are made available to all @@ -164,7 +164,8 @@ changelog: # # Defaults to no files being bumped bumps: - # The path of the file relative to where Uplift is executed + # The path of the file relative to where Uplift is executed. Glob + # patterns can be used to match multiple files at the same time - file: package.json # A JSON path matcher should be used when bumping the file. Multiple @@ -185,7 +186,8 @@ bumps: # Defaults to false semver: true - # The path of the file relative to where Uplift is executed + # The path of the file relative to where Uplift is executed. Glob + # patterns can be used to match multiple files at the same time - file: chart/my-chart/Chart.yaml # A regex matcher should be used when bumping the file. Multiple diff --git a/docs/static/schema.json b/docs/static/schema.json index b3dc1b76..766717a0 100644 --- a/docs/static/schema.json +++ b/docs/static/schema.json @@ -9,7 +9,7 @@ "properties": { "file": { "$comment": "https://upliftci.dev/reference/config#bumps", - "description": "The path of the file to bump relative to where Uplift is executed", + "description": "The path of the file relative to where Uplift is executed. Glob patterns can be used to match multiple files at the same time. Glob syntax is based on https://github.com/goreleaser/fileglob", "type": "string" }, "regex": { @@ -36,7 +36,7 @@ "properties": { "pattern": { "$comment": "https://upliftci.dev/reference/config#bumps", - "description": "A regex pattern for matching and replacing the version within the file", + "description": "A regex pattern for matching and replacing the version within the file.", "type": "string" }, "count": { diff --git a/htmltest.yml b/htmltest.yml index ba556450..b0805362 100644 --- a/htmltest.yml +++ b/htmltest.yml @@ -1,6 +1,7 @@ IgnoreURLs: - fonts.gstatic.com - https://twitter.com/GA_Uplift + - https://docs.github.com IgnoreDirectoryMissingTrailingSlash: true IgnoreAltMissing: true IgnoreInternalEmptyHash: true