From 2ac31afb31dfc53c9973adda624c62e741424975 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 15 Oct 2025 07:53:16 -0500 Subject: pass the build version to dpkg --- Makefile | 2 +- argv.go | 15 ++++++++------- doBuild.debian.go | 3 +++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index ef277f3..edaf40a 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ deb-with-commits-all: rm -f ~/incoming/*.deb forge commit --all forge normal - wit build deb --all --force + wit build deb --all --force --buildversion 7 deb-with-commits-all-riscv64: make commit diff --git a/argv.go b/argv.go index fbd4b53..3f92e1d 100644 --- a/argv.go +++ b/argv.go @@ -56,13 +56,14 @@ type LinuxCmd struct { } type DebianCmd struct { - Release bool `arg:"--release" help:"use go-deb --release"` - DryRun bool `arg:"--dry-run" help:"only show what would be packaged"` - Verbose bool `arg:"--verbose" help:"be loud about it"` - Force bool `arg:"--force" help:"force devel .deb builds into /incoming"` - Priv bool `arg:"--private" help:"build private repos"` - All bool `arg:"--all" help:"build everything again"` - Arch string `arg:"--arch" help:"what arch"` + Release bool `arg:"--release" help:"use go-deb --release"` + DryRun bool `arg:"--dry-run" help:"only show what would be packaged"` + Verbose bool `arg:"--verbose" help:"be loud about it"` + Force bool `arg:"--force" help:"force devel .deb builds into /incoming"` + Priv bool `arg:"--private" help:"build private repos"` + All bool `arg:"--all" help:"build everything again"` + BuildVersion int `arg:"--buildversion" help:"the build version"` + Arch string `arg:"--arch" help:"what arch"` } type CloneCmd struct { diff --git a/doBuild.debian.go b/doBuild.debian.go index 6075c29..8bf1c15 100644 --- a/doBuild.debian.go +++ b/doBuild.debian.go @@ -161,6 +161,9 @@ func buildDeb(repo *gitpb.Repo) error { if argv.Build.Debian.Arch != "" { cmd = append(cmd, "--arch", argv.Build.Debian.Arch) } + if argv.Build.Debian.BuildVersion != 0 { + cmd = append(cmd, "--buildversion", log.Sprintf("%d", argv.Build.Debian.BuildVersion)) + } if shouldBuild(repo) != "yes" { return nil -- cgit v1.2.3