Skip to content

Commit 0b49da7

Browse files
committedFeb 23, 2024·
run sed once to replace all versions in a file
1 parent 83b81d5 commit 0b49da7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎scripts/bump-version.bash

+5-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ echo "Updating $pre_commit_hook"
5454
sed_ "s/entry: docker\\.io\\/rhysd\\/actionlint:.*/entry: docker.io\\/rhysd\\/actionlint:${version}/" "$pre_commit_hook"
5555

5656
echo "Updating $usage_doc"
57-
sed_ "s/ rev: v[0-9]+\.[0-9]+\.[0-9]+/ rev: v${version}/" "$usage_doc"
58-
sed_ "s/actionlint@[0-9]+\.[0-9]+\.[0-9]+/actionlint@${version}/g" "$usage_doc"
59-
sed_ "s/\`actionlint:[0-9]+\.[0-9]+\.[0-9]+\`/\`actionlint:${version}\`/g" "$usage_doc"
57+
sed_ "\
58+
s/ rev: v[0-9]+\.[0-9]+\.[0-9]+/ rev: v${version}/; \
59+
s/ actionlint@[0-9]+\.[0-9]+\.[0-9]+/ actionlint@${version}/g; \
60+
s/\`actionlint:[0-9]+\.[0-9]+\.[0-9]+\`/\`actionlint:${version}\`/g; \
61+
" "$usage_doc"
6062

6163
echo 'Creating a version bump commit and a version tag'
6264
git add "$pre_commit_hook" "$usage_doc"

0 commit comments

Comments
 (0)
Please sign in to comment.