Only set epoch if not equal to zero

master
Arsen Musayelyan 2 months ago
parent 8661721ccc
commit 1f39f5edf1

@ -245,7 +245,6 @@ func buildPackage(ctx context.Context, script string, mgr manager.Manager) ([]st
Arch: runtime.GOARCH,
Version: vars.Version,
Release: strconv.Itoa(vars.Release),
Epoch: strconv.FormatUint(uint64(vars.Epoch), 10),
Homepage: vars.Homepage,
License: strings.Join(vars.Licenses, ", "),
Maintainer: vars.Maintainer,
@ -257,6 +256,10 @@ func buildPackage(ctx context.Context, script string, mgr manager.Manager) ([]st
},
}
if vars.Epoch != 0 {
pkgInfo.Epoch = strconv.FormatUint(uint64(vars.Epoch), 10)
}
setScripts(&vars, pkgInfo, filepath.Dir(script))
if slices.Contains(vars.Architectures, "all") {

Loading…
Cancel
Save