Skip to content

Commit

Permalink
fix(please): phar name and path
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Aug 8, 2018
1 parent 0cad4e8 commit 29efce8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions please
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,14 @@ if [ "null" == "$LAST_RELEASE_ID" ]; then
fi

# no need to publish phar
if [ ! -f ./box.json ]; then
if [ ! -f ./box.json ] || [ ! -f ./composer.json ]; then
info "Check ${TMP_LOG} for logs"
exit 0
fi

PBIN=`cat composer.json | jq -r '.bin[0]?'`
if [ "null" == "$PBIN" ]; then
red "Check bin value in composer.json"
info "Check ${TMP_LOG} for logs"
exit 0
fi
Expand All @@ -192,8 +199,8 @@ info "Compiling phar ..."
php ~/box.phar compile >> ${TMP_LOG}
ok

PHAR_FILE=`ls -t $(pwd)/bin/*.phar | head -1`
NAME=`basename ${PHAR_FILE}`
NAME="${PBIN}.phar"
PHAR_FILE=`realpath ${NAME}`
info "Publishing phar ..."

SIZE=`github \
Expand Down

0 comments on commit 29efce8

Please sign in to comment.