new release strategy for ng next

Signed-off-by: eromano <eugenioromano16@gmail.com>
This commit is contained in:
eromano
2022-07-27 11:03:01 +02:00
parent a87bf9ab23
commit fde31d8532
3 changed files with 28 additions and 3 deletions

View File

@@ -51,6 +51,7 @@ branches:
- develop
#remove after upgrade
- angular-upgrade-v13
- angular-upgrade-v14
- /.*old-env.*/
- /.*next-release.*/
- /.*beta.*/

View File

@@ -24,6 +24,16 @@ then
fi
fi
if [[ $TRAVIS_BRANCH =~ angular-upgrade-v13 ]]
then
./scripts/update-version.sh -gnu -nextalpha -major || exit 1;
fi
if [[ $TRAVIS_BRANCH =~ angular-upgrade-v14 ]]
then
./scripts/update-version.sh -gnu -nextalpha -major || exit 1;
fi
node ./scripts/pre-publish.js
fi;

View File

@@ -6,15 +6,29 @@ cd $DIR/../../../
if [[ $TRAVIS_EVENT_TYPE == "push" ]] || [[ $TRAVIS_EVENT_TYPE == "cron" ]] || [[ $TRAVIS_EVENT_TYPE == "api" ]]
then
TAG_NPM=latest
if [[ $TRAVIS_BRANCH =~ ^develop(-patch.*)?$ ]] || [[ $TRAVIS_EVENT_TYPE == "cron" ]] || [[ $TRAVIS_EVENT_TYPE == "api" ]]
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"
npx @alfresco/adf-cli@alpha npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
./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;