Files
2022-07-27 11:03:01 +02:00

35 lines
842 B
Bash
Executable File

#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../../../
if [[ $TRAVIS_EVENT_TYPE == "push" ]] || [[ $TRAVIS_EVENT_TYPE == "cron" ]] || [[ $TRAVIS_EVENT_TYPE == "api" ]]
then
if [[ $TRAVIS_BRANCH =~ ^master(-patch.*)?$ ]]
then
TAG_NPM=latest
fi
if [[ $TRAVIS_BRANCH =~ ^develop(-patch.*)?$ ]]
then
TAG_NPM=alpha
fi
if [[ $TRAVIS_BRANCH =~ angular-upgrade-v13 ]]
then
TAG_NPM=a13
fi
if [[ $TRAVIS_BRANCH =~ angular-upgrade-v14 ]]
then
TAG_NPM=a14
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)"
else
echo "PR No need to release in NPM"
fi;