-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sig
committed
Feb 25, 2021
1 parent
a0e8693
commit fc3feac
Showing
1 changed file
with
20 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
.PHONY: install | ||
|
||
.PHONY: docker | ||
TOPDIR = $(shell pwd) | ||
|
||
GOPATH = $(shell go env GOPATH) | ||
GOBINDATA := $(GOPATH)/bin/go-bindata | ||
export GOWORKSPACE := $(shell pwd) | ||
export GOBIN := $(GOWORKSPACE)/bin | ||
export GO111MODULE := on | ||
|
||
# BIN := go-bindata-assetfs | ||
GO_BINS = | ||
GO_BINS += graphspace | ||
|
||
all: dep | ||
$(GOBINDATA) -pkg data -o data/bindata.go static static/images | ||
all: | ||
$(MAKE) compile | ||
|
||
dev: | ||
$(GOBINDATA) -debug -pkg data -o data/bindata.go static static/images | ||
go install github.com/sigmonsays/graphspace/... | ||
compile: | ||
mkdir -p tmp | ||
mkdir -p $(GOBIN) | ||
go install github.com/... | ||
|
||
dep: | ||
go get github.com/jteeuwen/go-bindata/go-bindata | ||
go get github.com/elazarl/go-bindata-assetfs/... | ||
install: | ||
mkdir -p $(DESTDIR)/$(INSTALL_PREFIX)/bin/ | ||
$(MAKE) install-bins | ||
|
||
docker: | ||
# build docker image | ||
docker build -t graphspace:latest . | ||
docker-push: | ||
docker tag graphspace:latest sigmonsays/graphspace:latest | ||
docker push sigmonsays/graphspace:latest | ||
install-bins: $(addprefix installbin-, $(GO_BINS)) | ||
|
||
$(addprefix installbin-, $(GO_BINS)): | ||
$(eval BIN=$(@:installbin-%=%)) | ||
cp -v $(GOBIN)/$(BIN) $(DESTDIR)/$(INSTALL_PREFIX)/bin/ |