Skip to content

CLI-165 Automate install scripts version update on release#113

Open
kirill-knize-sonarsource wants to merge 3 commits intomasterfrom
automate-install-scripts-version-update
Open

CLI-165 Automate install scripts version update on release#113
kirill-knize-sonarsource wants to merge 3 commits intomasterfrom
automate-install-scripts-version-update

Conversation

@kirill-knize-sonarsource
Copy link
Member

No description provided.

@sonar-review-alpha
Copy link

sonar-review-alpha bot commented Mar 17, 2026

Summary

Automates the version update of install scripts during the release process. When a release is cut, the workflow now automatically extracts the new version from git tags and updates the hardcoded version strings in both user-scripts/install.sh (bash) and user-scripts/install.ps1 (PowerShell). This ensures the installation scripts always distribute the correct version without manual intervention.

What reviewers should know

Start with the two new steps added to .github/workflows/full-release.yml (the main change):

  1. "Get released version" — fetches tags and extracts the latest version
  2. "Update install scripts version" — uses sed to update version variables in bash and PowerShell scripts

Note: These steps run before the existing "bump-version" step. Make sure the sed patterns match the exact syntax in the install scripts (they look for version="X.Y.Z" in bash and $SonarVersion = "X.Y.Z" in PowerShell). If the install scripts use different formatting, the sed commands won't match.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Mar 17, 2026

CLI-165

Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conclusion: The install scripts version update logic has a bug in the install.sh sed pattern that will corrupt the script on every release.

🗣️ Give feedback

Copy link
Contributor

@damien-urruty-sonarsource damien-urruty-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should work but there is a better way to do it IMO

@kirill-knize-sonarsource kirill-knize-sonarsource force-pushed the automate-install-scripts-version-update branch from 44b365f to 40905e4 Compare March 19, 2026 10:16
Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conclusion: The previous sed pattern issue remains unresolved — the fix from the prior review has not been applied.

🗣️ Give feedback

Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ✅

🗣️ Give feedback

@kirill-knize-sonarsource kirill-knize-sonarsource force-pushed the automate-install-scripts-version-update branch from 44adbe7 to f1db82e Compare March 19, 2026 15:42
@sonarqubecloud
Copy link

Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conclusion: Clean, focused PR. The sed patterns are correctly scoped, the RELEASED_VERSION env var is properly injected, and the modified files are committed via the existing peter-evans/create-pull-request step at the end of the bump-version job.

🗣️ Give feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants