aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6dfb177..ee028b1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,7 @@
+XGOARCH := amd64
+XGOOS := linux
+XBIN := $(XGOOS)_$(XGOARCH)/lftpq
+
all: lint test install
deps:
@@ -16,3 +20,13 @@ lint: check-fmt vet
install:
go install ./...
+
+xinstall:
+ env GOOS=$(XGOOS) GOARCH=$(XGOARCH) go install ./...
+
+publish:
+ifndef DEST_PATH
+ $(error DEST_PATH must be set when publishing)
+endif
+ rsync -a $(GOPATH)/bin/$(XBIN) $(DEST_PATH)/$(XBIN)
+ @sha256sum $(GOPATH)/bin/$(XBIN)