From 4f5de509e13f36254d56374e679e210b33526d1c Mon Sep 17 00:00:00 2001 From: Ralph Meier Date: Mon, 27 Apr 2020 14:45:57 +0200 Subject: [PATCH] fix(create-release-branch): improve error description --- .../sh-is-release-branch-creation-allowed.js | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/lib/shell/sh-is-release-branch-creation-allowed.js b/lib/shell/sh-is-release-branch-creation-allowed.js index 841a252..e26fb0e 100644 --- a/lib/shell/sh-is-release-branch-creation-allowed.js +++ b/lib/shell/sh-is-release-branch-creation-allowed.js @@ -11,7 +11,40 @@ module.exports = function (dep) { if (!isPatchAllowed) { const msg = ` It's not allowed to create a patch version based on ${argv.baseTag} - Please first execute 'npx @daraff/create-bump-pr@latest' to bump the version on master + Please first execute 'npx @daraff/create-bump-pr@latest' to bump the tag version on master + + ---------------------------------------------- + Workflow for a Bump PR / Create Release Branch + ---------------------------------------------- + 1) Execute npx @daraff/create-bump-pr (see example and option description) + - the script automatically updates the README.md with an empty line to indicate a change + - the script create a PR to incite a new minor version + 2) Go to github and merge the PR + 3) Wait until the merged PR on master created a new minor github tag + 4) Go to your repo again + 5) Execute git pull --tags + 6) Execute npx @livingdocs/release-tools@latest create-release-branch again + + ------- + Example + ------- + npx @daraff/create-bump-pr \ + --token= \ + --owner= \ + --repo= + + ------- + Options + ------- + ****token**** + You need a personal github access token to create a bump PR. + Go to https://github.com/settings/tokens/new to create a token with 'repo' scope + + ****owner**** + The owner of the repository (e.g. livingdocsIO) + + ****repo**** + The repository name (e.g. livingdocs-server) ` return reject(new Error(msg)) }