[AAE-10077] ADF's cron job, make it smarter by avoiding publishing on NPM and triggering the PR upstream (#7725)

* Avoid the publish on NPM and create useless PR upstream if same ADF sha

* Remove useless file
This commit is contained in:
Maurizio Vitale
2022-07-26 21:24:50 +02:00
committed by GitHub
parent d8f1eda132
commit d3ae78d855
3 changed files with 88 additions and 6 deletions

View File

@@ -13,9 +13,14 @@ then
if [[ $TRAVIS_BRANCH =~ ^develop(-patch.*)?$ ]] || [[ $TRAVIS_EVENT_TYPE == "cron" ]] || [[ $TRAVIS_EVENT_TYPE == "api" ]]
then
echo "Replace NPM version with new Alpha tag"
NEXT_VERSION=-nextalpha
./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1;
isSameADFSha=$(node $BUILD_PIPELINE_DIR/adf-same-commit-verify.js --token=$TOKEN --head=$BRANCH_TO_CREATE --repo=$NAME_REPO --commit=$COMMIT )
if [ "$isSameADFSha" = 'true' ]; then
echo 'ADF sha is the same. No need to publish again on NPM'
else
echo "Replace NPM version with new Alpha tag"
NEXT_VERSION=-nextalpha
./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1;
fi
fi
node ./scripts/pre-publish.js