2024-02-22 15:28:08 -06:00
|
|
|
# this makefile assumes you want to build in this directory
|
|
|
|
# and are developing so it sets export GO111MODULE=off
|
2024-01-31 14:25:19 -06:00
|
|
|
|
2024-01-15 12:43:08 -06:00
|
|
|
all: build
|
2024-11-13 21:30:42 -06:00
|
|
|
# reset
|
|
|
|
# ./autotypist
|
2024-02-16 17:55:53 -06:00
|
|
|
|
2024-02-22 15:28:08 -06:00
|
|
|
build:
|
|
|
|
echo "build it!"
|
|
|
|
@# copy the toolkits into the binary during debugging
|
|
|
|
-rm resources/*.so
|
|
|
|
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
|
2024-11-05 07:48:22 -06:00
|
|
|
GO111MODULE=off go build -v -x \
|
|
|
|
-ldflags " \
|
|
|
|
-X main.VERSION=${VERSION}"
|
2024-02-22 15:28:08 -06:00
|
|
|
|
2024-02-29 17:29:19 -06:00
|
|
|
vet:
|
|
|
|
GO111MODULE=off go vet
|
|
|
|
|
2024-02-16 17:55:53 -06:00
|
|
|
only-me: build
|
2024-01-23 11:22:33 -06:00
|
|
|
reset
|
2024-02-15 22:46:35 -06:00
|
|
|
./autotypist --only-me
|
2024-01-17 01:55:22 -06:00
|
|
|
|
|
|
|
stderr: build
|
2024-02-13 09:18:04 -06:00
|
|
|
echo "writing to /tmp/autotypist.log"
|
|
|
|
./autotypist >/tmp/autotypist.log 2>&1
|
2024-01-15 12:43:08 -06:00
|
|
|
|
2024-01-20 16:09:15 -06:00
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
|
|
|
# // to globally reset paths:
|
2024-02-07 15:24:59 -06:00
|
|
|
# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
|
|
|
|
|
2024-11-05 07:51:12 -06:00
|
|
|
debian:
|
2024-11-16 00:11:38 -06:00
|
|
|
go-deb --auto --repo go.wit.com/apps/autotypist
|
2024-11-05 07:51:12 -06:00
|
|
|
|
2024-11-04 03:23:28 -06:00
|
|
|
# build then run with gui in libcurses
|
|
|
|
console: build
|
2024-02-07 15:24:59 -06:00
|
|
|
reset
|
2024-02-13 09:18:04 -06:00
|
|
|
./autotypist --gui gocui >/tmp/autotypist.log 2>&1
|
2024-01-20 16:09:15 -06:00
|
|
|
|
2024-01-17 01:55:22 -06:00
|
|
|
install:
|
2024-11-07 03:09:46 -06:00
|
|
|
-rm resources/*.so
|
|
|
|
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
|
|
|
|
GO111MODULE=off go install -v -x \
|
|
|
|
-ldflags " \
|
|
|
|
-X main.VERSION=${VERSION}"
|
2024-01-09 01:16:00 -06:00
|
|
|
|
2024-01-15 22:56:21 -06:00
|
|
|
check-git-clean:
|
|
|
|
@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)
|
|
|
|
|
2024-11-22 21:34:33 -06:00
|
|
|
clean:
|
|
|
|
rm -f go.*
|
|
|
|
rm -f autotypist
|
|
|
|
|
2024-01-09 01:16:00 -06:00
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
2024-01-09 09:35:54 -06:00
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|
2024-01-09 01:16:00 -06:00
|
|
|
|
2024-11-04 03:23:28 -06:00
|
|
|
curl-help:
|
|
|
|
curl --silent http://localhost:9419/help
|
|
|
|
|
2024-11-04 06:16:52 -06:00
|
|
|
# only show repos that git reports as dirty
|
|
|
|
curl-list-dirty:
|
|
|
|
curl --silent http://localhost:9419/list?onlydirty=true
|
|
|
|
|
|
|
|
# only show repos that need to be merged to the master branch
|
2024-11-04 05:44:32 -06:00
|
|
|
curl-list-changed:
|
2024-11-04 03:23:28 -06:00
|
|
|
curl --silent http://localhost:9419/list?perfect=false
|
|
|
|
|
2024-11-04 06:16:52 -06:00
|
|
|
# include repos that you probably can't git push commits
|
2024-11-04 05:44:32 -06:00
|
|
|
curl-list-include-readonly:
|
2024-11-04 03:23:28 -06:00
|
|
|
curl --silent http://localhost:9419/list?readonly=true
|
|
|
|
|
2024-11-04 06:16:52 -06:00
|
|
|
# list every repo found
|
2024-11-04 03:23:28 -06:00
|
|
|
curl-gitpull-everypackage:
|
|
|
|
curl --silent http://localhost:9419/gitpull
|
|
|
|
|
|
|
|
curl-gitpull-helloworld:
|
|
|
|
curl --silent http://localhost:9419/gitpull?repo=go.wit.com/apps/helloworld
|
|
|
|
|
|
|
|
curl-gitpull-basicworld:
|
|
|
|
curl --silent http://localhost:9419/gitpull?repo=go.wit.com/apps/basicworld
|
|
|
|
|
2024-11-04 05:44:32 -06:00
|
|
|
curl-release-helloworld:
|
|
|
|
curl --silent http://localhost:9419/release?repo=go.wit.com/apps/helloworld
|
|
|
|
|
|
|
|
curl-release-gowit:
|
|
|
|
curl --silent http://localhost:9419/release?repo=go.wit.com/lib/gui/gowit
|
|
|
|
|
2024-11-13 12:29:25 -06:00
|
|
|
file-for-go.wit.com:
|
2024-11-04 03:23:28 -06:00
|
|
|
curl --silent http://localhost:9419/goweblist?readonly=true
|
|
|
|
curl --silent http://localhost:9419/goweblist?readonly=true |sort > ~/go.wit.com.versions
|