mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-05-15 06:18:28 +00:00
Updated the magefile.go to use new version of archiver library
This commit is contained in:
parent
06781103f0
commit
6585e6672f
21
magefile.go
21
magefile.go
@ -587,13 +587,30 @@ func Release() error {
|
|||||||
|
|
||||||
if platform.OS == "windows" {
|
if platform.OS == "windows" {
|
||||||
// build a zip binary as well
|
// build a zip binary as well
|
||||||
err := archiver.Zip.Make(fmt.Sprintf("%s.zip", platform.ReleaseBase()), []string{platform.ArchiveDir()})
|
|
||||||
|
// creates a Zip configuration
|
||||||
|
z := archiver.Zip{
|
||||||
|
CompressionLevel: 3,
|
||||||
|
MkdirAll: true,
|
||||||
|
SelectiveCompression: true,
|
||||||
|
ContinueOnError: false,
|
||||||
|
OverwriteExisting: false,
|
||||||
|
ImplicitTopLevelFolder: false,
|
||||||
|
}
|
||||||
|
|
||||||
|
err := z.Archive([]string{platform.ArchiveDir()}, fmt.Sprintf("%s.zip", platform.ReleaseBase()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// build tar gz
|
// build tar gz
|
||||||
err := archiver.TarGz.Make(fmt.Sprintf("%s.tar.gz", platform.ReleaseBase()), []string{platform.ArchiveDir()})
|
|
||||||
|
//creates TarGz configuration
|
||||||
|
t := archiver.TarGz{
|
||||||
|
CompressionLevel: 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
err := t.Archive([]string{platform.ArchiveDir()}, fmt.Sprintf("%s.tar.gz", platform.ReleaseBase()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user