Skip to content

Commit

Permalink
[ACS-5186] Use update version script for ADF upstream (#3197)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
MichalKinas authored May 17, 2023
1 parent f1d8b84 commit 38a6d86
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 68 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/upstream-adf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
70 changes: 35 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions projects/aca-folder-rules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions projects/aca-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 38a6d86

Please sign in to comment.