Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: expand file bumping documentation to include glob support #290

Merged
merged 4 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/bumping-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 5 additions & 3 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/static/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions htmltest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
IgnoreURLs:
- fonts.gstatic.com
- https://twitter.com/GA_Uplift
- https://docs.github.com
IgnoreDirectoryMissingTrailingSlash: true
IgnoreAltMissing: true
IgnoreInternalEmptyHash: true
Expand Down