Skip to content

Commit

Permalink
Add a new option to the bump-version script
Browse files Browse the repository at this point in the history
This option outputs the files that the script updates when changing
the version of the project.
  • Loading branch information
mcdonnnj committed Sep 26, 2024
1 parent 922f814 commit 2f21cbd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bump-version
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

# bump-version [--push] [--label LABEL] (major | minor | patch | prerelease | build | finalize | show)
# bump-version --list-files

set -o nounset
set -o errexit
Expand All @@ -17,12 +18,14 @@ Update the version of the project.
Usage:
${0##*/} [--push] [--label LABEL] (major | minor | patch | prerelease | build | finalize | show)
${0##*/} --list-files
${0##*/} (-h | --help)
Options:
-h | --help Show this message.
--push Perform a \`git push\` after updating the version.
--label LABEL Specify the label to use when updating the build or prerelease version.
--list-files List the files that will be updated when the version is bumped.
END_OF_LINE
)

Expand Down Expand Up @@ -107,6 +110,10 @@ else
echo "$USAGE"
exit 0
;;
--list-files)
printf '%s\n' "${VERSION_FILES[@]}"
exit 0
;;
*)
invalid_option "Invalid option: $1"
;;
Expand Down

0 comments on commit 2f21cbd

Please sign in to comment.