Eugenio Romano c860923691 Use npx instead of absolute adf-cli path (#5053)
(reverted from commit 140f60b8dc966297e3c690e7edebc9aaac8e2b3c)
2019-09-10 16:07:52 +01:00

23 lines
559 B
Bash
Executable File

#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
if [[ $TRAVIS_PULL_REQUEST == "false" ]];
then
TAG_NPM=latest
if [[ $TRAVIS_BRANCH == "development" ]];
then
TAG_NPM=alpha
if [[ $TRAVIS_EVENT_TYPE == "cron" ]];
then
TAG_NPM=beta
fi
fi
fi;
echo "Publishing on npm with tag $TAG_NPM"
./node_modules/@alfresco/adf-cli/bin/adf-cli npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"