84 lines
2.2 KiB
Makefile
84 lines
2.2 KiB
Makefile
|
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"
|
||
|
|
||
|
go-build: goimports
|
||
|
GO111MODULE=off go build \
|
||
|
-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}"
|
||
|
|
||
|
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
|