Command aptly publish switch to switch published snapshot. #8

This commit is contained in:
Andrey Smirnov
2014-04-22 20:17:21 +04:00
parent 1200e9cc95
commit cc8baec317
15 changed files with 532 additions and 7 deletions
+10
View File
@@ -223,6 +223,16 @@ func (p *PublishedRepo) UpdateLocalRepo() {
p.rePublishing = true
}
func (p *PublishedRepo) UpdateSnapshot(snapshot *Snapshot) {
if p.SourceKind != "snapshot" {
panic("not snapshot publish")
}
p.snapshot = snapshot
p.SourceUUID = snapshot.UUID
p.rePublishing = true
}
// Encode does msgpack encoding of PublishedRepo
func (p *PublishedRepo) Encode() []byte {
var buf bytes.Buffer