Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix for the pipeline release #210

Merged
merged 6 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/angular-accelerator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion libs/angular-integration-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
2 changes: 1 addition & 1 deletion libs/angular-remote-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion libs/integration-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions libs/keycloak-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions libs/portal-integration-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions libs/shell-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
26 changes: 26 additions & 0 deletions release-script.sh
Original file line number Diff line number Diff line change
@@ -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


2 changes: 1 addition & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
},
],
[
Expand Down
Loading