|
|
@ -196,11 +196,16 @@ func buildPackagesIndices(ctx context.Context, ownerID int64, repoVersion *packa |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
packagesContent, _ := packages_module.NewHashedBuffer() |
|
|
|
packagesContent, _ := packages_module.NewHashedBuffer() |
|
|
|
|
|
|
|
defer packagesContent.Close() |
|
|
|
|
|
|
|
|
|
|
|
packagesGzipContent, _ := packages_module.NewHashedBuffer() |
|
|
|
packagesGzipContent, _ := packages_module.NewHashedBuffer() |
|
|
|
|
|
|
|
defer packagesGzipContent.Close() |
|
|
|
|
|
|
|
|
|
|
|
gzw := gzip.NewWriter(packagesGzipContent) |
|
|
|
gzw := gzip.NewWriter(packagesGzipContent) |
|
|
|
|
|
|
|
|
|
|
|
packagesXzContent, _ := packages_module.NewHashedBuffer() |
|
|
|
packagesXzContent, _ := packages_module.NewHashedBuffer() |
|
|
|
|
|
|
|
defer packagesXzContent.Close() |
|
|
|
|
|
|
|
|
|
|
|
xzw, _ := xz.NewWriter(packagesXzContent) |
|
|
|
xzw, _ := xz.NewWriter(packagesXzContent) |
|
|
|
|
|
|
|
|
|
|
|
w := io.MultiWriter(packagesContent, gzw, xzw) |
|
|
|
w := io.MultiWriter(packagesContent, gzw, xzw) |
|
|
@ -323,6 +328,8 @@ func buildReleaseFiles(ctx context.Context, ownerID int64, repoVersion *packages |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inReleaseContent, _ := packages_module.NewHashedBuffer() |
|
|
|
inReleaseContent, _ := packages_module.NewHashedBuffer() |
|
|
|
|
|
|
|
defer inReleaseContent.Close() |
|
|
|
|
|
|
|
|
|
|
|
sw, err := clearsign.Encode(inReleaseContent, e.PrivateKey, nil) |
|
|
|
sw, err := clearsign.Encode(inReleaseContent, e.PrivateKey, nil) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
@ -367,11 +374,14 @@ func buildReleaseFiles(ctx context.Context, ownerID int64, repoVersion *packages |
|
|
|
sw.Close() |
|
|
|
sw.Close() |
|
|
|
|
|
|
|
|
|
|
|
releaseGpgContent, _ := packages_module.NewHashedBuffer() |
|
|
|
releaseGpgContent, _ := packages_module.NewHashedBuffer() |
|
|
|
|
|
|
|
defer releaseGpgContent.Close() |
|
|
|
|
|
|
|
|
|
|
|
if err := openpgp.ArmoredDetachSign(releaseGpgContent, e, bytes.NewReader(buf.Bytes()), nil); err != nil { |
|
|
|
if err := openpgp.ArmoredDetachSign(releaseGpgContent, e, bytes.NewReader(buf.Bytes()), nil); err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
releaseContent, _ := packages_module.CreateHashedBufferFromReader(&buf) |
|
|
|
releaseContent, _ := packages_module.CreateHashedBufferFromReader(&buf) |
|
|
|
|
|
|
|
defer releaseContent.Close() |
|
|
|
|
|
|
|
|
|
|
|
for _, file := range []struct { |
|
|
|
for _, file := range []struct { |
|
|
|
Name string |
|
|
|
Name string |
|
|
|