Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions system/t12_api/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def check(self):
self.check_exists(
"public/" + prefix + "/pool/main/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb")

# publishing under root, custom distribution, architectures
# publishing under root, custom distribution, architectures, codename
distribution = self.random_name()
task = self.post_task(
"/api/publish/:.",
Expand All @@ -85,13 +85,14 @@ def check(self):
"Signing": DefaultSigningOptions,
"Distribution": distribution,
"Architectures": ["i386", "amd64"],
"Codename": distribution,
}
)
self.check_task(task)
repo2_expected = {
'AcquireByHash': False,
'Architectures': ['amd64', 'i386'],
'Codename': '',
'Codename': distribution,
'Distribution': distribution,
'Label': '',
'Origin': '',
Expand Down
Loading