Add simple Makefile for common tasks.
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 7 Jun 2020 04:21:37 +0000 (00:21 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 7 Jun 2020 04:21:37 +0000 (00:21 -0400)
.gitignore
Makefile [new file with mode: 0644]

index a79c85367166f053ff25e303ece04100b6f5dc53..5000e08088c1c311ed1e5a06ae8e7966371cf34a 100644 (file)
@@ -1,2 +1,6 @@
 config.json
+cover.html
+cover.out
 mailpopbox
+mailpopbox-linux-amd64
+mailpopbox-mac-amd64
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..6620afd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,12 @@
+.PHONY:
+all: coverage mac linux
+
+coverage:
+       go test -coverprofile ./cover.out ./...
+       go tool cover -html=cover.out -o cover.html
+
+mac:
+       GOOS=darwin GOARCH=amd64 go build -o mailpopbox-mac-amd64
+
+linux:
+       GOOS=linux GOARCH=amd64 go build -o mailpopbox-linux-amd64