diff --git a/cmd/yap/command/build.go b/cmd/yap/command/build.go index 9e70dce..0367ff9 100644 --- a/cmd/yap/command/build.go +++ b/cmd/yap/command/build.go @@ -51,8 +51,8 @@ func init() { "nomakedeps", "d", false, "Skip all make dependency (makedeps) checks") buildCmd.Flags().BoolVarP(&project.NoBuild, "nobuild", "o", false, "Download and extract files only") - buildCmd.PersistentFlags().StringVarP(&parser.OverridePkgver, - "pkgver", "w", "", "Use a custom package version (pkgver)") + buildCmd.PersistentFlags().StringVarP(&parser.OverridePkgRel, + "pkgrel", "r", "", "Use a custom package release (pkgrel)") buildCmd.Flags().BoolVarP(&project.SkipSyncDeps, "skip-sync", "s", false, "Skip sync with remotes for package managers") buildCmd.Flags().StringVarP(&source.SSHPassword, diff --git a/pkg/parser/parser.go b/pkg/parser/parser.go index 5318ee2..cba16a0 100644 --- a/pkg/parser/parser.go +++ b/pkg/parser/parser.go @@ -11,9 +11,10 @@ import ( "mvdan.cc/sh/v3/syntax" ) -// OverridePkgver is a variable that allows overriding the PkgVer field in -// PKGBUILD. This can be useful for setting a custom package version. -var OverridePkgver string +// OverridePkgRel is a variable that allows overriding the Pkgrel field in +// PKGBUILD. This can be useful for setting a custom package revision in +// CI, as a timestamp, for example. +var OverridePkgRel string // ParseFile parses a file and returns a PKGBUILD object and an error. // @@ -75,8 +76,8 @@ func ParseFile(distro, release, startDir, home string) (*pkgbuild.PKGBUILD, erro return nil, err } - if OverridePkgver != "" { - pkgBuild.PkgVer = OverridePkgver + if OverridePkgRel != "" { + pkgBuild.PkgRel = OverridePkgRel } return pkgBuild, err