[ACS-5186] Use update version script for ADF upstream (#3197)

* [ACS-5186] Use update version script for ADF upstream

* [ACS-5186] Bump ADF and JS-API version

* [ACS-5186] Correct version

* [ACS-5186] Correct migration logic
This commit is contained in:
MichalKinas 2023-05-17 15:02:22 +02:00 committed by GitHub
parent f1d8b84d2b
commit 38a6d8698b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 59 additions and 68 deletions

View File

@ -107,9 +107,6 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Run install
run: |
npm ci --ignore-scripts
- name: Migration
shell: bash
env:
@ -121,36 +118,30 @@ jobs:
run: |
migrateDependenciesADF() {
echo "Update ADF dependencies to: ${PACKAGE_VERSION_ADF}"
echo "Calling migration ADF"
npx nx migrate @alfresco/adf-extensions@${PACKAGE_VERSION_ADF}
npx nx migrate @alfresco/adf-core@${PACKAGE_VERSION_ADF}
npx nx migrate @alfresco/adf-content-services@${PACKAGE_VERSION_ADF}
npx nx migrate @alfresco/adf-cli@${PACKAGE_VERSION_ADF}
npx nx migrate @alfresco/adf-testing@${PACKAGE_VERSION_ADF}
./scripts/update-version.sh -v ${PACKAGE_VERSION_ADF} -vj latest
echo "Migration ADF done"
}
migrateDependenciesJS() {
echo "Update JS dependencies to: ${PACKAGE_VERSION_JS}"
echo "Calling migration JS"
npx nx migrate @alfresco/js-api@${PACKAGE_VERSION_JS}
./scripts/update-version.sh -v latest -vj ${PACKAGE_VERSION_JS}
echo "Migration JS done"
}
regeneratePackageLock() {
echo "Regenerate lock"
npm i --package-lock-only
echo "Package-lock done."
migrateAllDependencies() {
echo "Update ADF dependencies to: ${PACKAGE_VERSION_JS} and JS dependencies to: ${PACKAGE_VERSION_JS}"
./scripts/update-version.sh -v ${PACKAGE_VERSION_ADF} -vj ${PACKAGE_VERSION_JS}
echo "Migration done"
}
if git checkout ${BRANCH_TO_CREATE} 2>/dev/null ; then
git reset --hard origin/develop
echo "Reset branch"
fi
if [[ "$IS_ADF_AFFECTED" == "true" ]]; then
if [[ "$IS_ADF_AFFECTED" == "true" ]] && [[ "$IS_JS_AFFECTED" == "true" ]]; then
migrateAllDependencies
elif [[ "$IS_ADF_AFFECTED" == "true" ]]; then
migrateDependenciesADF
fi
if [[ "$IS_JS_AFFECTED" == "true" ]]; then
elif [[ "$IS_JS_AFFECTED" == "true" ]]; then
migrateDependenciesJS
fi
regeneratePackageLock
- name: Commit Code
if: ${{ needs.upstream.outputs.hasNewVersion == 'true' }}
uses: stefanzweifel/git-auto-commit-action@v4

70
package-lock.json generated
View File

@ -10,10 +10,10 @@
"hasInstallScript": true,
"license": "LGPL-3.0",
"dependencies": {
"@alfresco/adf-content-services": "6.1.0-4944969415",
"@alfresco/adf-core": "6.1.0-4944969415",
"@alfresco/adf-extensions": "6.1.0-4944969415",
"@alfresco/js-api": "6.0.0",
"@alfresco/adf-content-services": "6.1.0-4985617493",
"@alfresco/adf-core": "6.1.0-4985617493",
"@alfresco/adf-extensions": "6.1.0-4985617493",
"@alfresco/js-api": "6.1.0.925",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
"@angular/common": "14.1.3",
@ -42,8 +42,8 @@
"zone.js": "0.11.8"
},
"devDependencies": {
"@alfresco/adf-cli": "6.1.0-4944969415",
"@alfresco/adf-testing": "6.1.0-4944969415",
"@alfresco/adf-cli": "6.1.0-4985617493",
"@alfresco/adf-testing": "6.1.0-4985617493",
"@angular-devkit/build-angular": "14.1.3",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",
@ -118,17 +118,17 @@
"dev": true
},
"node_modules/@alfresco/adf-cli": {
"version": "6.1.0-4944969415",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-6.1.0-4944969415.tgz",
"integrity": "sha512-IaLCO81eigcRbcQLkQglu+dxSvW6tx4T4hzMP7Z1qBHFEC82lOv2d0ux84llnOCM6WjRFsOg3fwwa5wjufhOSQ==",
"version": "6.1.0-4985617493",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-6.1.0-4985617493.tgz",
"integrity": "sha512-HAnH3EJBfHrrJgL4FDlidexU/faHR+LhPPduoF6r21gQVvuAgXqc9ms/4n4QmRG268Rd97hFb5nWTNBr3q7vRg==",
"dev": true,
"dependencies": {
"@alfresco/js-api": "6.0.0",
"commander": "6.2.1",
"@alfresco/js-api": ">=6.0.0",
"commander": "^6.2.1",
"ejs": "^2.6.1",
"license-checker": "^25.0.1",
"npm-registry-fetch": "^4.0.5",
"request": "2.88.2",
"request": "^2.88.2",
"rxjs": "^6.6.6",
"shelljs": "^0.8.3",
"spdx-license-list": "^5.0.0"
@ -139,15 +139,15 @@
}
},
"node_modules/@alfresco/adf-content-services": {
"version": "6.1.0-4944969415",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-6.1.0-4944969415.tgz",
"integrity": "sha512-gogJ9LyY73sRwxR/mwzNEb5/XTVzfzB2Vci1ktoFqCDGQdwaftC0ZMQatMkJ+6mlpPvoZAjw0WPFnBZJk0gtoA==",
"version": "6.1.0-4985617493",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-6.1.0-4985617493.tgz",
"integrity": "sha512-kNzZZgCLUtfqNMpikXbBDRjfkpntl/VjdBxkdjxfloYSQRczBaHRkvvCRutfALh6dAfR/ghcbOBenlB3wN7ssQ==",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/adf-core": "6.1.0-4944969415",
"@alfresco/js-api": "6.0.0",
"@alfresco/adf-core": "6.1.0-4985617493",
"@alfresco/js-api": ">=6.0.0",
"@angular/animations": ">=14.1.3",
"@angular/cdk": ">=14.1.2",
"@angular/common": ">=14.1.3",
@ -164,18 +164,18 @@
}
},
"node_modules/@alfresco/adf-core": {
"version": "6.1.0-4944969415",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-6.1.0-4944969415.tgz",
"integrity": "sha512-k5wTWQUwqxE63EU7NwiNepmZqKYshQIKNQJHIQFM3unSCDtO4jtqSp+uSlfpr/WTBis42DAuUb3wA3qO2d+byw==",
"version": "6.1.0-4985617493",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-6.1.0-4985617493.tgz",
"integrity": "sha512-vHO4NCN7O0oKTO0tfI27q5QSFybO4slJsnrUo/+zT/gO3P28IkdWdC4ivMB6WxxXyiK2vErz+ydhmtQoEaEtvw==",
"dependencies": {
"angular-oauth2-oidc": "^13.0.1",
"angular-oauth2-oidc-jwks": "^13.0.1",
"cropperjs": "1.5.13",
"cropperjs": "^1.5.13",
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/adf-extensions": "6.1.0-4944969415",
"@alfresco/js-api": "6.0.0",
"@alfresco/adf-extensions": "6.1.0-4985617493",
"@alfresco/js-api": ">=6.0.0",
"@angular/animations": ">=14.1.3",
"@angular/cdk": ">=14.1.2",
"@angular/common": ">=14.1.3",
@ -194,25 +194,25 @@
}
},
"node_modules/@alfresco/adf-extensions": {
"version": "6.1.0-4944969415",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-6.1.0-4944969415.tgz",
"integrity": "sha512-cQqFZjsa+tq16jkKofhMse1MYh4Xr+ogWnBjb81sUHCufveVJCu9cNeMdMLcuWNyD8Z2r8agZvDNVkn5E7Htzw==",
"version": "6.1.0-4985617493",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-6.1.0-4985617493.tgz",
"integrity": "sha512-TypFoulTh2farK7Z2cW3a64YNhNxe6HpiissbknE5c0/I6Qzj9G8h0micT1dqFBjWbGqW2fv8IkZ49kMYneUwA==",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/js-api": "6.0.0",
"@alfresco/js-api": ">=6.0.0",
"@angular/common": ">=14.1.3",
"@angular/core": ">=14.1.3"
}
},
"node_modules/@alfresco/adf-testing": {
"version": "6.1.0-4944969415",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-6.1.0-4944969415.tgz",
"integrity": "sha512-8PJftlWTp4duO5CMbAaHsR1c+RDZ6yERO4P/uchyPKwws1rBRDMDt1KbUOCNzyu80PLc/U8gpKh5iADauI4JwA==",
"version": "6.1.0-4985617493",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-6.1.0-4985617493.tgz",
"integrity": "sha512-/+whRvbAxpl77U3fjTUcixef8oxZrNaJdRwAao8sCaINzF7CaTPGmrCx3DTeJGRCL78gOXqom+LCreo2YyNqiA==",
"dev": true,
"dependencies": {
"@alfresco/js-api": "6.1.0-912",
"@alfresco/js-api": "6.1.0-922",
"@angular/compiler": "14.1.3",
"@angular/core": "14.1.3",
"rxjs": "6.6.6",
@ -220,13 +220,13 @@
"zone.js": "~0.11.4"
},
"peerDependencies": {
"@alfresco/js-api": "6.0.0"
"@alfresco/js-api": ">=6.0.0"
}
},
"node_modules/@alfresco/adf-testing/node_modules/@alfresco/js-api": {
"version": "6.1.0-912",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-6.1.0-912.tgz",
"integrity": "sha512-hKEPph79GIaZBh73AGdYeVfH8dLFFx8aFX+4cAmsIpxBEKJuty2k4Zn9a+aKvnFAymh2pCtJxeOWoDxKV991/w==",
"version": "6.1.0-922",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-6.1.0-922.tgz",
"integrity": "sha512-bKZo7vnh7LsCG0oAKs25bls8EIR69pCYiDI4hNUCCdujEzFEm1icu2mtDaprlhCTuoMsUE7EUahJhOZqLyxhOA==",
"dev": true,
"dependencies": {
"event-emitter": "^0.3.5",

View File

@ -38,10 +38,10 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "6.1.0-4944969415",
"@alfresco/adf-core": "6.1.0-4944969415",
"@alfresco/adf-extensions": "6.1.0-4944969415",
"@alfresco/js-api": "6.0.0",
"@alfresco/adf-content-services": "6.1.0-4985617493",
"@alfresco/adf-core": "6.1.0-4985617493",
"@alfresco/adf-extensions": "6.1.0-4985617493",
"@alfresco/js-api": "6.1.0.925",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
"@angular/common": "14.1.3",
@ -70,8 +70,8 @@
"zone.js": "0.11.8"
},
"devDependencies": {
"@alfresco/adf-cli": "6.1.0-4944969415",
"@alfresco/adf-testing": "6.1.0-4944969415",
"@alfresco/adf-cli": "6.1.0-4985617493",
"@alfresco/adf-testing": "6.1.0-4985617493",
"@angular-devkit/build-angular": "14.1.3",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",

View File

@ -5,10 +5,10 @@
"peerDependencies": {
"@angular/common": "^14.1.0",
"@angular/core": "^14.1.0",
"@alfresco/adf-core": "6.1.0-4944969415",
"@alfresco/adf-content-services": "6.1.0-4944969415",
"@alfresco/adf-extensions": "6.1.0-4944969415",
"@alfresco/js-api": "6.0.0",
"@alfresco/adf-core": "6.1.0-4985617493",
"@alfresco/adf-content-services": "6.1.0-4985617493",
"@alfresco/adf-extensions": "6.1.0-4985617493",
"@alfresco/js-api": ">=6.0.0",
"@angular/animations": "^14.1.3",
"@angular/cdk": "^14.1.3",
"@angular/flex-layout": "^14.0.0-beta.40",

View File

@ -5,10 +5,10 @@
"license": "LGPL-3.0",
"scripts": {},
"peerDependencies": {
"@alfresco/adf-content-services": "6.1.0-4944969415",
"@alfresco/adf-core": "6.1.0-4944969415",
"@alfresco/adf-extensions": "6.1.0-4944969415",
"@alfresco/js-api": "6.0.0",
"@alfresco/adf-content-services": "6.1.0-4985617493",
"@alfresco/adf-core": "6.1.0-4985617493",
"@alfresco/adf-extensions": "6.1.0-4985617493",
"@alfresco/js-api": ">=6.0.0",
"@angular/animations": "^14.1.3",
"@angular/common": "^14.1.3",
"@angular/compiler": "^14.1.3",