mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-08 22:30:41 +00:00
Merge branch 'debinst' of https://github.com/ryanuber/aptly into ryanuber-debinst
Conflicts: deb/publish_test.go
This commit is contained in:
@@ -547,6 +547,35 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorage
|
||||
release["SHA256"] += fmt.Sprintf(" %s %8d %s\n", info.SHA256, info.Size, path)
|
||||
}
|
||||
|
||||
for _, arch := range p.Architectures {
|
||||
st := make(Stanza)
|
||||
st["Archive"] = p.Distribution
|
||||
st["Architecture"] = arch
|
||||
|
||||
if arch != "source" {
|
||||
arch = fmt.Sprintf("binary-%s", arch)
|
||||
}
|
||||
|
||||
file, err := publishedStorage.CreateFile(filepath.Join(basePath, p.Component, arch, "Release"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to create Release file: %s", err)
|
||||
}
|
||||
|
||||
bufWriter := bufio.NewWriter(file)
|
||||
|
||||
err = st.WriteTo(bufWriter)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to create Release file: %s", err)
|
||||
}
|
||||
|
||||
err = bufWriter.Flush()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to create Release file: %s", err)
|
||||
}
|
||||
|
||||
file.Close()
|
||||
}
|
||||
|
||||
releaseFile, err := publishedStorage.CreateFile(filepath.Join(basePath, "Release"+suffix))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to create Release file: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user