Skip to content

Add -AsTag parameter to Get-Version#1965

Merged
flanakin merged 3 commits intodevfrom
flanakin/get-version-astag
Feb 23, 2026
Merged

Add -AsTag parameter to Get-Version#1965
flanakin merged 3 commits intodevfrom
flanakin/get-version-astag

Conversation

@flanakin
Copy link
Collaborator

🛠️ Description

Added -AsTag switch to Get-Version.ps1 that returns the full git tag (e.g., v13 instead of 13.0). Updated Package-Toolkit.ps1 to use it so zip filenames match release expectations (finops-hub-v13.zip instead of finops-hub-v13.0.zip). Updated Update-Version.ps1 to use it for writing ftktag.txt instead of inline regex.

📋 Checklist

🔬 How did you test this change?

  • 🤏 Lint tests
  • 🤞 PS -WhatIf / az validate
  • 👍 Manually deployed + verified
  • 💪 Unit tests
  • 🙌 Integration tests

🙋‍♀️ Do any of the following that apply?

  • 🚨 This is a breaking change.
  • 🤏 The change is less than 20 lines of code.

📑 Did you update docs/changelog.md?

  • ✅ Updated changelog (required for dev PRs)
  • ➡️ Will add log in a future PR (feature branch PRs only)
  • ❎ Log not needed (small/internal change)

📖 Did you update documentation?

  • ✅ Public docs in docs (required for dev)
  • ✅ Public docs in docs-mslearn (required for dev)
  • ✅ Internal dev docs in docs-wiki (required for dev)
  • ✅ Internal dev docs in src (required for dev)
  • ➡️ Will add docs in a future PR (feature branch PRs only)
  • ❎ Docs not needed (small/internal change)

🤖 Generated with Claude Code

- Add -AsTag switch to Get-Version.ps1 that returns the full git tag (e.g., "v13")
- Update Package-Toolkit.ps1 to use Get-Version -AsTag for zip filenames
- Update Update-Version.ps1 to use Get-Version -AsTag for ftktag.txt

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 31, 2026 22:22
@microsoft-github-policy-service microsoft-github-policy-service bot added Micro PR 🔬 Very small PR that should be especially easy for newcomers Needs: Review 👀 PR that is ready to be reviewed labels Jan 31, 2026
@microsoft-github-policy-service microsoft-github-policy-service bot added the Skill: DevOps GitHub setup and automation label Jan 31, 2026
@flanakin flanakin added this to the v14 milestone Jan 31, 2026
Copy link
Contributor

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

Adds a new -AsTag switch to the version helper script and updates packaging/versioning scripts to use git-tag style versions (for example, v13) where needed.

Changes:

  • Added -AsTag switch to Get-Version.ps1 to return a git tag format (for example, v13).
  • Updated Update-Version.ps1 to use Get-Version -AsTag when writing ftktag.txt.
  • Updated Package-Toolkit.ps1 to use Get-Version -AsTag for packaging output naming (but this currently impacts non-zip uses of $version too).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/scripts/Get-Version.ps1 Adds -AsTag switch and updates help text/examples.
src/scripts/Update-Version.ps1 Uses Get-Version -AsTag to populate ftktag.txt (removes inline regex).
src/scripts/Package-Toolkit.ps1 Switches to tag-based version for ZIP naming, but currently also changes doc/deploy/version behaviors that appear to expect semantic major.minor.

flanakin and others added 2 commits January 31, 2026 14:44
Keep $version as semantic version (13.0) for deploy paths and ftkver.txt,
and use $tag (v13) only for zip filenames. Addresses PR review feedback.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address PR #1965 feedback: `if ($Template)` always evaluated to true
since $Template defaults to "*". Changed to `$Template -ne "*"` so the
message correctly shows "13.0 templates" when packaging all templates.

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@flanakin
Copy link
Collaborator Author

🤖 [AI][Claude] PR Update Summary

Addressed: 4 thread(s)

  • ✅ Already implemented: 2 (separate $version/$tag variables and ZIP naming — fixed in prior commit)
  • ✅ Implemented: 1 (fixed if ($Template) truthiness check)
  • ❎ No change needed: 1 (changelog not required for small internal change)

@flanakin flanakin enabled auto-merge (squash) February 23, 2026 05:19
@flanakin flanakin merged commit cd1bc47 into dev Feb 23, 2026
4 checks passed
@flanakin flanakin deleted the flanakin/get-version-astag branch February 23, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Micro PR 🔬 Very small PR that should be especially easy for newcomers Needs: Review 👀 PR that is ready to be reviewed Skill: DevOps GitHub setup and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants