Skip to content

Update each app.json once when running Increment Version Number #1820

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

Merged
merged 7 commits into from
Jul 15, 2025

Conversation

mazhelez
Copy link
Collaborator

@mazhelez mazhelez commented Jul 9, 2025

❔What, Why & How

Fix Increment Version Number to only change the versions in app.json-s only once. The issue manifests when "+0.1" is used as a parameter to increment the version number.

Related to issue: #1774

✅ Checklist

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios)

@Copilot Copilot AI review requested due to automatic review settings July 9, 2025 13:32
@mazhelez mazhelez requested a review from a team as a code owner July 9, 2025 13:32
Copilot

This comment was marked as outdated.

@mazhelez mazhelez requested a review from Copilot July 9, 2025 14:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that when incrementing version numbers with a relative value (e.g. "+0.1"), each app.json is only updated once per run.

  • Added an updatedAppFolders reference parameter to track and skip already-updated app folders
  • Updated the main Action script to pass and accumulate updatedAppFolders
  • Expanded PowerShell tests to verify that duplicate updates do not occur

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Tests/IncrementVersionNumber.Action.Test.ps1 New E2E/unit tests for Set-VersionInAppManifests to assert single update
RELEASENOTES.md Added a note for Issue 1774
Actions/IncrementVersionNumber/IncrementVersionNumber.psm1 Introduced [ref] $updatedAppFolders to avoid duplicate JSON updates
Actions/IncrementVersionNumber/IncrementVersionNumber.ps1 Passed the updatedAppFolders accumulator through the versioning calls
Comments suppressed due to low confidence (1)

Actions/IncrementVersionNumber/IncrementVersionNumber.psm1:192

  • [nitpick] Align this .Parameter updatedAppFolders entry with the other .Parameter lines in the comment block for consistent formatting.
    .Parameter updatedAppFolders

aholstrup1
aholstrup1 previously approved these changes Jul 10, 2025
@mazhelez mazhelez merged commit b763a6b into microsoft:main Jul 15, 2025
4 checks passed
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.

4 participants