|
|
@ -7,6 +7,8 @@ GOBUILD=$(GOCMD) build $(LDFLAGS) |
|
|
|
GOTEST=$(GOCMD) test $(LDFLAGS)
|
|
|
|
GOTEST=$(GOCMD) test $(LDFLAGS)
|
|
|
|
GOGET=$(GOCMD) get
|
|
|
|
GOGET=$(GOCMD) get
|
|
|
|
BINARY_NAME=writefreely
|
|
|
|
BINARY_NAME=writefreely
|
|
|
|
|
|
|
|
DOCKERCMD=docker
|
|
|
|
|
|
|
|
IMAGE_NAME=writeas/writefreely
|
|
|
|
|
|
|
|
|
|
|
|
all : build |
|
|
|
all : build |
|
|
|
|
|
|
|
|
|
|
@ -22,6 +24,9 @@ build-windows: deps |
|
|
|
build-darwin: deps |
|
|
|
build-darwin: deps |
|
|
|
cd cmd/writefreely; GOOS=darwin GOARCH=amd64 $(GOBUILD) -v
|
|
|
|
cd cmd/writefreely; GOOS=darwin GOARCH=amd64 $(GOBUILD) -v
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build-docker : |
|
|
|
|
|
|
|
$(DOCKERCMD) build -t $(IMAGE_NAME):latest -t $(IMAGE_NAME):$(GITREV) .
|
|
|
|
|
|
|
|
|
|
|
|
test: |
|
|
|
test: |
|
|
|
$(GOTEST) -v ./...
|
|
|
|
$(GOTEST) -v ./...
|
|
|
|
|
|
|
|
|
|
|
@ -54,6 +59,11 @@ release : clean ui |
|
|
|
$(MAKE) build-windows
|
|
|
|
$(MAKE) build-windows
|
|
|
|
cp cmd/writefreely/$(BINARY_NAME).exe build
|
|
|
|
cp cmd/writefreely/$(BINARY_NAME).exe build
|
|
|
|
cd build; zip -r ../$(BINARY_NAME)_$(GITREV)_windows_amd64.zip ./*
|
|
|
|
cd build; zip -r ../$(BINARY_NAME)_$(GITREV)_windows_amd64.zip ./*
|
|
|
|
|
|
|
|
$(MAKE) build-docker
|
|
|
|
|
|
|
|
$(MAKE) release-docker
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
release-docker : |
|
|
|
|
|
|
|
$(DOCKERCMD) push $(IMAGE_NAME)
|
|
|
|
|
|
|
|
|
|
|
|
ui : force_look |
|
|
|
ui : force_look |
|
|
|
cd less/; $(MAKE) $(MFLAGS)
|
|
|
|
cd less/; $(MAKE) $(MFLAGS)
|
|
|
|