From 3b132693eab0fe3f34259100b1240c8c7269c330 Mon Sep 17 00:00:00 2001 From: Barry Gordon Date: Mon, 21 Feb 2022 21:08:58 +0000 Subject: [PATCH 1/2] v1.2.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ed9d9ee..25e75ae9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dependabot-pull-request-action", - "version": "1.1.1", + "version": "1.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dependabot-pull-request-action", - "version": "1.1.1", + "version": "1.2.1", "license": "MIT", "dependencies": { "@actions/core": "^1.6.0", diff --git a/package.json b/package.json index a9b3b93f..64f880a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dependabot-pull-request-action", - "version": "1.1.1", + "version": "1.2.1", "description": "Parse Dependabot commit metadata to automate PR handling", "main": "dist/index.js", "scripts": { From cf742d5346c5b1b05632bfaca814bda9ea556626 Mon Sep 17 00:00:00 2001 From: Barry Gordon Date: Mon, 21 Feb 2022 21:09:15 +0000 Subject: [PATCH 2/2] Add a bump-version script --- bin/bump-version | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 bin/bump-version diff --git a/bin/bump-version b/bin/bump-version new file mode 100755 index 00000000..e1521fee --- /dev/null +++ b/bin/bump-version @@ -0,0 +1,28 @@ +#!/bin/bash + +usage() { echo "Usage: $0 -p [major | minor | patch]" 1>&2; exit 1; } + +while getopts "p:" o; do + case "${o}" in + p) + patch_level=${OPTARG} + (( patch_level == 'major' || patch_level == 'minor' || patch_level == 'patch')) + ;; + *) + usage + ;; + esac +done + +echo "$patch_level" + +if [[ -z "${patch_level}" ]]; then + usage +fi + +new_version=$(npm version "${patch_level}" --no-git-tag-version) +git checkout -b "${new_version}"-release-notes +git add package.json package-lock.json +git commit -m "${new_version}" + +echo "Branch prepared for ${new_version}"