diff --git a/libs/angular-accelerator/package.json b/libs/angular-accelerator/package.json index eb2b738b..76851af3 100644 --- a/libs/angular-accelerator/package.json +++ b/libs/angular-accelerator/package.json @@ -9,8 +9,8 @@ "@angular/platform-browser": "^15.2.7", "@angular/router": "^15.2.7", "@ngx-translate/core": "^14.0.0", - "@onecx/integration-interface": "~4", - "@onecx/angular-integration-interface": "~4", + "@onecx/integration-interface": "^4", + "@onecx/angular-integration-interface": "^4", "chart.js": "^4.4.0", "d3-scale-chromatic": "^3.0.0", "rxjs": "~7.8.0", diff --git a/libs/angular-integration-interface/package.json b/libs/angular-integration-interface/package.json index 3a57decd..2e50e715 100644 --- a/libs/angular-integration-interface/package.json +++ b/libs/angular-integration-interface/package.json @@ -3,7 +3,7 @@ "version": "4.13.2", "peerDependencies": { "@angular/core": "^15.2.7", - "@onecx/integration-interface": "~4", + "@onecx/integration-interface": "^4", "rxjs": "~7.8.0" }, "dependencies": {}, diff --git a/libs/angular-remote-components/package.json b/libs/angular-remote-components/package.json index 6c6d8359..50e7ca1d 100644 --- a/libs/angular-remote-components/package.json +++ b/libs/angular-remote-components/package.json @@ -4,7 +4,7 @@ "peerDependencies": { "@angular/common": "^15.2.7", "@angular/core": "^15.2.7", - "@onecx/angular-accelerator": "~4", + "@onecx/angular-accelerator": "^4", "@ngx-translate/core": "^14.0.0", "rxjs": "~7.8.0" }, diff --git a/libs/integration-interface/package.json b/libs/integration-interface/package.json index ac7344f7..a33b54cb 100644 --- a/libs/integration-interface/package.json +++ b/libs/integration-interface/package.json @@ -4,7 +4,7 @@ "peerDependencies": { "tslib": "^2.3.0", "rxjs": "7.8.1", - "@onecx/accelerator": "~4" + "@onecx/accelerator": "^4" }, "type": "commonjs", "main": "./src/index.js", diff --git a/libs/keycloak-auth/package.json b/libs/keycloak-auth/package.json index b5242b3c..6a0ae289 100644 --- a/libs/keycloak-auth/package.json +++ b/libs/keycloak-auth/package.json @@ -4,8 +4,8 @@ "peerDependencies": { "@angular/common": ">=15.2.7", "@angular/core": ">=15.2.7", - "@onecx/angular-integration-interface": "~4", - "@onecx/integration-interface": "~4", + "@onecx/angular-integration-interface": "^4", + "@onecx/integration-interface": "^4", "keycloak-angular": "^13.0.0", "keycloak-js": "^18.0.0", "rxjs": "~7.8.0" diff --git a/libs/portal-integration-angular/package.json b/libs/portal-integration-angular/package.json index 40fd5ea3..f650672b 100644 --- a/libs/portal-integration-angular/package.json +++ b/libs/portal-integration-angular/package.json @@ -15,10 +15,10 @@ "@ngrx/router-store": "^15.4.0", "@ngrx/store": "^15.4.0", "@ngneat/until-destroy": "^9.2.2", - "@onecx/angular-accelerator": "~4", - "@onecx/integration-interface": "~4", - "@onecx/angular-integration-interface": "~4", - "@onecx/angular-testing": "~4", + "@onecx/angular-accelerator": "^4", + "@onecx/integration-interface": "^4", + "@onecx/angular-integration-interface": "^4", + "@onecx/angular-testing": "^4", "fast-deep-equal": "^3.1.3", "msw": "^1.3.2", "rxjs": "~7.8.0", diff --git a/libs/shell-core/package.json b/libs/shell-core/package.json index ed82ae75..c5273859 100644 --- a/libs/shell-core/package.json +++ b/libs/shell-core/package.json @@ -7,10 +7,10 @@ "@angular/common": "^15.2.7", "@angular/core": "^15.2.7", "@angular/router": "^15.2.7", - "@onecx/angular-accelerator": "~4", - "@onecx/angular-integration-interface": "~4", - "@onecx/angular-remote-components": "~4", - "@onecx/portal-integration-angular": "~4", + "@onecx/angular-accelerator": "^4", + "@onecx/angular-integration-interface": "^4", + "@onecx/angular-remote-components": "^4", + "@onecx/portal-integration-angular": "^4", "@ngneat/until-destroy": "^9.2.2", "primeng": "^15.2.1" }, diff --git a/release-script.sh b/release-script.sh new file mode 100755 index 00000000..1f5c93b1 --- /dev/null +++ b/release-script.sh @@ -0,0 +1,26 @@ +#!/bin/bash +packageJsonData=$(cat package.json) +topLevelPackageVersion=$(echo "$packageJsonData" | jq -r '.version') +if [ $topLevelPackageVersion != $VERSION ] +then + npx -p replace-json-property rjp ./package.json version $VERSION +fi + +folder_names=() +directory="libs" +while IFS= read -r folder; do + folder_names+=("$folder") +done < <(find "$directory" -mindepth 1 -maxdepth 1 -type d | awk -F "/" '{print $NF}' | sort | uniq) + +for folder in "${folder_names[@]}"; do + packageJsonDataLib=$(cat libs/$folder/package.json) + libPackageVersion=$(echo "$packageJsonDataLib" | jq -r '.version') + packageJsonDataLib=$(echo "$packageJsonDataLib" | sed -E 's/(@onecx[^"]+?": *?")([^"]+)"/\1^'$VERSION'"/') +if [ $libPackageVersion != $VERSION ] +then + npx -p replace-json-property rjp libs/$folder/package.json version $VERSION + npx nx run $folder:release +fi +done + + diff --git a/release.config.js b/release.config.js index bad72e69..7d005e2a 100644 --- a/release.config.js +++ b/release.config.js @@ -26,7 +26,7 @@ module.exports = { [ '@semantic-release/exec', { - prepareCmd: `VERSION=\${nextRelease.version} npx nx run-many -t release --verbose && VERSION=\${nextRelease.version} npx -p replace-json-property rjp ./package.json version \${nextRelease.version}`, + prepareCmd: `VERSION=\${nextRelease.version} && ./release-script.sh`, }, ], [