mirror of
https://github.com/dependabot/fetch-metadata.git
synced 2026-03-12 18:07:12 -04:00
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.
12 lines
319 B
Bash
Executable File
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
|