aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-10 15:26:02 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-10 15:26:02 +0100
commit9a6e24aea0c0229b9b30dcf0136228bda34e4690 (patch)
treee2b9dbbb98861f556b050f52d26f064fb2cc9b77 /Makefile
parent7ab5451a3f5865a6cb3ef0979da979b9496ce990 (diff)
downloadguichet-9a6e24aea0c0229b9b30dcf0136228bda34e4690.tar.gz
guichet-9a6e24aea0c0229b9b30dcf0136228bda34e4690.zip
Containerize
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ed43d56..26734d2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,19 @@
-all: guichet
+BIN=guichet
+SRC=main.go ssha.go profile.go admin.go
+DOCKER=lxpz/guichet_amd64
-guichet: main.go ssha.go profile.go admin.go
- go get -v
- go build -v
+all: $(BIN)
+
+$(BIN): $(SRC)
+ go get -d -v
+ go build -v -o $(BIN)
+
+$(BIN).static: $(SRC)
+ go get -d -v
+ CGO_ENABLED=0 GOOS=linux go build -a -v -o $(BIN).static
+
+docker: $(BIN).static
+ docker build -t $(DOCKER):$(TAG) .
+ docker push $(DOCKER):$(TAG)
+ docker tag $(DOCKER):$(TAG) $(DOCKER):latest
+ docker push $(DOCKER):latest