diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile | 16 | ||||
| -rw-r--r-- | tableRepos.go | 5 |
3 files changed, 22 insertions, 1 deletions
@@ -1,7 +1,7 @@ *.swp go.mod go.sum -wit +wit* wit-test /files/* *.deb @@ -1,3 +1,5 @@ +.PHONY: build + VERSION = $(shell git describe --tags) GUIVERSION = $(shell git describe --tags) # BUILDTIME = $(shell date +%Y.%m.%d) @@ -5,6 +7,8 @@ BUILDTIME = $(shell date +%s) all: install +build-all-oses: go-build build-darwin build-windows + go-build: goimports GO111MODULE=off go build \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" @@ -17,6 +21,18 @@ install: goimports GO111MODULE=off go install \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" +build-darwin: + GOOS=darwin GOARCH=amd64 GO111MODULE=off go build -v -o wit-darwin.x86 \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +build-darwin-arm64: + GOOS=darwin GOARCH=arm64 GO111MODULE=off go build -v -o wit-darwin.arm \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +build-windows: + GOOS=windows GOARCH=amd64 GO111MODULE=off go build -v -o wit.exe \ + -ldflags "-X main.VERSION=v0.7.46 -X main.BUILDTIME=2025.02.22_0643 -X gui.GUIVERSION=v0.7.46" + vet: GO111MODULE=off go vet diff --git a/tableRepos.go b/tableRepos.go index 7d322fc..0b0b719 100644 --- a/tableRepos.go +++ b/tableRepos.go @@ -4,6 +4,8 @@ package main import ( + "fmt" + "go.wit.com/lib/protobuf/gitpb" ) @@ -24,6 +26,9 @@ func debianFilename(repo *gitpb.Repo) string { ver := trimNonNumericFromStart(manufactured) name := me.forge.Config.DebName(repo.Namespace) if actualp := me.machine.FindByVersion(name, ver); actualp != nil { + if actualp.PkgName == "" { + return fmt.Sprintf("%v", actualp) + } return actualp.PkgName } return "hmm" |
