summaryrefslogtreecommitdiff
path: root/testGui/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-28 18:27:38 -0600
committerJeff Carr <[email protected]>2024-11-28 18:27:38 -0600
commitbe0378f5486184b69b5da59461786477d753b8a3 (patch)
treed11001460150ee998feb66a3052d2034f71815d4 /testGui/Makefile
parent8bf3997c81db88d8401db28c86f701be014442c2 (diff)
add a test example
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'testGui/Makefile')
-rw-r--r--testGui/Makefile47
1 files changed, 47 insertions, 0 deletions
diff --git a/testGui/Makefile b/testGui/Makefile
new file mode 100644
index 0000000..24fc00d
--- /dev/null
+++ b/testGui/Makefile
@@ -0,0 +1,47 @@
+VERSION = $(shell git describe --tags)
+GUIVERSION = $(shell git describe --tags)
+BUILDTIME = $(shell date +%Y.%m.%d)
+
+all: build list
+
+build:
+ reset
+ GO111MODULE=off go build \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+ ./testGui --no-gui --list
+
+vet:
+ GO111MODULE=off go vet
+
+goimports:
+ goimports -w *.go
+ # // to globally reset paths:
+ # // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
+
+gocui: build
+ reset
+ ./testGui --gui gocui
+
+install:
+ GO111MODULE=off go install \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
+check-git-clean:
+ @git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)
+
+redomod:
+ rm -f go.*
+ GO111MODULE= go mod init
+ GO111MODULE= go mod tidy
+
+list-packages:
+ ./testGui --no-gui --list
+
+pull: build
+ ./testGui --git-pull
+
+update: build
+ ./testGui --apt-update --dry-run
+
+make-install: build
+ ./testGui --no-gui --make-install