From cfecd247ec2495523a2f557d4243391f905c7460 Mon Sep 17 00:00:00 2001 From: Jitendra Adhikari Date: Thu, 15 Aug 2019 22:49:01 +0700 Subject: [PATCH] feat: read events from please.json (can still be overridden by params) --- README.md | 2 +- please | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ca1ad05..502c5c7 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ Actually you can release any thing not just PHP/Nodejs. Please itself is [releas - Bump the version as per semver, reflect that into `./VERSION` file and commit it - If any of the latest commits start with `feat` `` is bumped - But if only you didnt explicitly pass `scope` already -- Release the new version and tag to github - If there is `package.json` file, bump `package.json#version` and commit it - If `package.json#private` is not set to `true` - If npm user not already logged in, run `npm adduser` - Run `npm publish` finally +- Release the new version and tag to github - If there is `box.json` file, compile phar using `box` (download `box.phar` if required) - Upload the compiled `phar` as asset for the recent release diff --git a/please b/please index 88f979d..2482015 100755 --- a/please +++ b/please @@ -236,7 +236,9 @@ trigger() # $1 = event GCFMT="%s (%an)" # git commit log format REPO=`git config --get remote.origin.url | sed -e 's/git@github.com://;s/https:\/\/github.com\///;s/.git//'` - +if [ -f ./please.json ]; then + eval $(cat ./please.json | jq -r 'to_entries|map("EVENTS[\(.key)]=\"\(.value)\"")|.[]') +fi # argv parsing while [[ $# -gt 0 ]] @@ -385,7 +387,6 @@ if [[ $GPUSH -eq 1 ]]; then ok fi - # github release trigger before-github info "Releasing $NEXT_VERSION ..."