Skip to content

Commit dc15b65

Browse files
wbrezaCopilot
andauthored
fix: sync --version flag to extension metadata in azd x publish (#6792)
When the --version flag is provided to azd x publish, it was only used for GitHub release tag lookup and artifact discovery, but not propagated to extensionMetadata.Version. This caused the registry entry to always use the version from extension.yaml, overwriting the existing entry instead of appending a new version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent eeea61f commit dc15b65

File tree

1 file changed

+2
-0
lines changed
  • cli/azd/extensions/microsoft.azd.extensions/internal/cmd

1 file changed

+2
-0
lines changed

cli/azd/extensions/microsoft.azd.extensions/internal/cmd/publish.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ func runPublishAction(ctx context.Context, flags *publishFlags, defaultRegistryU
113113

114114
if flags.version == "" {
115115
flags.version = extensionMetadata.Version
116+
} else {
117+
extensionMetadata.Version = flags.version
116118
}
117119

118120
// Use artifacts patterns from flag

0 commit comments

Comments
 (0)