Merge branch 'debinst' of https://github.com/ryanuber/aptly into ryanuber-debinst

Conflicts:
	deb/publish_test.go
This commit is contained in:
Andrey Smirnov
2014-06-07 16:34:39 +04:00
2 changed files with 51 additions and 0 deletions
+29
View File
@@ -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)