Skip to content

Commit

Permalink
fix: trim leading -- from event name
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Sep 27, 2019
1 parent 455d5dc commit 7febd62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions please
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ publish-npm()
# trigger event
trigger() # $1 = event
{
local EVENT="--$1"
local EVENT="$1"
local CMD="${EVENTS[$EVENT]}"
if [[ "$CMD" != "" ]]; then
Expand All @@ -236,6 +236,8 @@ 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//'`
# argv parsing
while [[ $# -gt 0 ]]
do
Expand All @@ -249,7 +251,7 @@ do
-y | --yes) YES=1; shift 1 ;;
-V | --version) NEXT_VERSION=$2; shift 2 ;;
-o | --organize) TYPES=$2; shift 2 ;;
--before-* | --after-*) EVENTS[$1]="$2"; shift 2 ;;
--before-* | --after-*) EVENTS[${1/--}]="$2"; shift 2 ;;
version) version; exit 0 ;;
minor) MINOR=1; shift 1 ;;
major) MAJOR=1; shift 1 ;;
Expand Down

0 comments on commit 7febd62

Please sign in to comment.