summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-07 17:17:01 -0600
committerJeff Carr <[email protected]>2025-01-07 17:17:01 -0600
commit7e47940796c6000787e531ae1846bee16ae73941 (patch)
treead8629e93f117094f0e98b90c6aeb7d0f4440070 /Makefile
parent5802e0f214c3b8c97bbfbb658258b011590a6e5b (diff)
cleanups due to autocomplete support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile66
1 files changed, 7 insertions, 59 deletions
diff --git a/Makefile b/Makefile
index edfedf8..90b8f6c 100644
--- a/Makefile
+++ b/Makefile
@@ -2,82 +2,30 @@ VERSION = $(shell git describe --tags)
GUIVERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
-all: go-build
- @echo "make debian-dry-run # shows what could be packaged"
- @echo "make debian-build # make .deb files for versions that are missing"
- @echo "make test-build # test build everything"
- @echo "make make-install # run 'make install' in each app repo to copy to ~/go/bin"
- @echo "make list # --list: list packaged apps in the wit repo"
- @echo "make update # --update: run apt update and apt install on all packages"
- @echo "make repomap # parse the go.wit.com repomap"
+all: install
go-build: goimports
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+install: goimports
+ GO111MODULE=off go install \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
vet:
GO111MODULE=off go vet
-only-me: go-build
- ./wit-test --only-me
-
stderr: go-build
echo "writing to /tmp/wit-test.log"
./wit-test >/tmp/wit-test.log 2>&1
goimports:
- reset
goimports -w *.go
# // to globally reset paths:
# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
-gocui: go-build
- ./wit-test --gui gocui >/tmp/wit-test.log 2>&1
-
-install: goimports
- GO111MODULE=off go install \
- -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+clean:
+ rm -f go.*
check-git-clean:
@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)
-
-list: go-build
- ./wit-test --no-gui --list
-
-pull: go-build
- ./wit-test --git-pull
-
-update: go-build
- ./wit-test --apt-update --dry-run
-
-force-build: go-build
- ./wit-test --force
-
-make-install: install
- wit-test --no-gui --make-install
- forge --find-private
-
-test-build: go-build
- ./wit-test --test-build
-
-make-install-dry-run: go-build
- ./wit-test --no-gui --make-install --dry-run
-
-protobuf:
- go-clone go.wit.com/apps/go-clone
-
-debian-dry-run: go-build
- ./wit-test --no-gui --dry-run --debian
-
-debian-build: go-build
- ./wit-test --no-gui --debian
- do-aptly
-
-repomap: go-build
- ./wit-test --no-gui --repomap /etc/gowebd/repomap
-
-repomap-dryrun: go-build
- ./wit-test --no-gui --repomap /etc/gowebd/repomap --dry-run
-
-test: go-build
- ./wit-test --no-gui --make-install --test