undeprecate latest via CI

This commit is contained in:
Bartosz Sekula
2023-01-27 10:30:23 +01:00
parent 4b0a86e0af
commit 8955c247fc
2 changed files with 22 additions and 18 deletions

View File

@@ -62,7 +62,9 @@ jobs:
include:
- stage: Quality and Unit tests
name: 'Build (without animation)'
script: npm ci && npm run build -- $BUILD_OPTS
script:
- npm ci
- ./scripts/ci/npm/publish-libs.sh
after_success: ./scripts/ci/utils/artifact-to-s3.sh -a $CONTENT_CE_DIST_PATH -o "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" || travis_terminate 1
cache: false

View File

@@ -58,29 +58,31 @@ npm run build-libs
for PROJECT in "${PROJECTS[@]}"
do
cd $DIST_DIR/${PROJECT}
PREVIOUS_LIBRARY_VERSION=$(npm view @alfresco/${PROJECT}@${TAG_NPM} version)
if [ "$DRY_RUN" = "true" ] ; then
echo -e "Publish with dry mode for project: $PROJECT\n"
echo -e "npm publish --dry-run --tag $TAG_NPM \n"
npm publish --dry-run --tag $TAG_NPM
echo -e "Deprecating old version of @alfresco/$PROJECT@${TAG_NPM} the old version is $PREVIOUS_LIBRARY_VERSION\n"
echo "npm deprecate @alfresco/$PROJECT@$PREVIOUS_LIBRARY_VERSION 'Upgrade to @latest or $NEW_LIBRARY_VERSION'"
else
echo -e "======== Publishing project: $PROJECT ========\n"
echo -e "npm publish --tag $TAG_NPM\n"
PREVIOUS_LIBRARY_VERSION=$(npm view @alfresco/${PROJECT} version)
echo 'strict-ssl=true' >> .npmrc
echo 'registry=https://${NPM_REGISTRY_ADDRESS}' >> .npmrc
echo '//${NPM_REGISTRY_ADDRESS}/:_authToken="${NPM_REGISTRY_TOKEN}"' >> .npmrc
npm publish --tag $TAG_NPM
npm deprecate "@alfresco/$PROJECT@$PREVIOUS_LIBRARY_VERSION" ""
echo -e "Deprecating old version of @alfresco/$PROJECT@${TAG_NPM} the old version is $PREVIOUS_LIBRARY_VERSION\n"
# if [ "$DRY_RUN" = "true" ] ; then
# echo -e "Publish with dry mode for project: $PROJECT\n"
# echo -e "npm publish --dry-run --tag $TAG_NPM \n"
npm deprecate "@alfresco/$PROJECT@$PREVIOUS_LIBRARY_VERSION" "Upgrade to @latest or $NEW_LIBRARY_VERSION"
fi
# npm publish --dry-run --tag $TAG_NPM
# echo -e "Deprecating old version of @alfresco/$PROJECT@${TAG_NPM} the old version is $PREVIOUS_LIBRARY_VERSION\n"
# echo "npm deprecate @alfresco/$PROJECT@$PREVIOUS_LIBRARY_VERSION 'Upgrade to @latest or $NEW_LIBRARY_VERSION'"
# else
# echo -e "======== Publishing project: $PROJECT ========\n"
# echo -e "npm publish --tag $TAG_NPM\n"
# echo 'strict-ssl=true' >> .npmrc
# echo 'registry=https://${NPM_REGISTRY_ADDRESS}' >> .npmrc
# echo '//${NPM_REGISTRY_ADDRESS}/:_authToken="${NPM_REGISTRY_TOKEN}"' >> .npmrc
# npm deprecate "@alfresco/$PROJECT@$PREVIOUS_LIBRARY_VERSION" "Upgrade to @latest or $NEW_LIBRARY_VERSION"
# fi
done