Files
fetch-metadata/bin/bump-version
Jeff Widman 6c5b8c2d48 Add workflow for creating release PR's (#360)
Add a workflow for creating release PR's. This way we don't have to do
it locally, and we guarantee the `npm` version used to generate the
version bump is consistent and stays in-sync with the repo instead of
whatever the dev happened to have on their local computer.
2023-05-18 11:56:46 -07:00

12 lines
319 B
Bash
Executable File

#!/bin/bash
usage() { echo "Usage: $0 [ major | minor | patch ]" 1>&2; exit 1; }
version_type=$1
if [ "$version_type" == "major" ] || [ "$version_type" == "minor" ] || [ "$version_type" == "patch" ]; then
new_version=$(npm version "$version_type" --no-git-tag-version) || exit
echo "$new_version"
else
usage
fi