api/publish: allow setting custom Codename on the Release file

This commit is contained in:
Eleni Michalaki committed 2026-08-26 11:35:43 +02:00
1 parent f59b0d2b06
commit 3d7f17e849
2 files changed
+6 -2

No files matched your search

+3
View File
@@ -160,6 +160,8 @@ type publishedRepoCreateParams struct {
Sources []sourceParams `binding:"required" json:"Sources"`
// Distribution name, if missing Aptly would try to guess from sources
Distribution string ` json:"Distribution" example:"bookworm"`
// Value of Codename: field in published repository stanza, if missing equals Distribution
Codename string ` json:"Codename" example:"bookworm"`
// Value of Label: field in published repository stanza
Label string ` json:"Label" example:""`
// Value of Origin: field in published repository stanza
@@ -354,6 +356,7 @@ func apiPublishRepoOrSnapshot(c *gin.Context) {
if b.ButAutomaticUpgrades != "" {
published.ButAutomaticUpgrades = b.ButAutomaticUpgrades
}
published.Codename = b.Codename
published.Label = b.Label
published.SkipContents = context.Config().SkipContentsPublishing