Skip to content

Commit 9f71e1b

Browse files
author
Jeff Mataya
committed
Building infrastructure for remote
1 parent 1b324a6 commit 9f71e1b

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

remote/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
remote
2+
vendor/

remote/Makefile

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
include ../makelib
2+
header = $(call baseheader, $(1), remote)
3+
4+
GOPATH = /tmp/go
5+
BUILD_ROOT_PATH=$(GOPATH)/src/github.com/FoxComm/highlander
6+
BUILD_PATH=$(BUILD_ROOT_PATH)/remote
7+
HIGHLANDER_PATH=$(CURDIR)/..
8+
9+
CMD_PREFIX=cd $(BUILD_PATH) && GOPATH=$(GOPATH)
10+
GO=$(CMD_PREFIX) go
11+
GO_TEST=$(CMD_PREFIX) GOENV=test go test
12+
GLIDE=$(CMD_PREFIX) glide
13+
DOCKER=$(CMD_PREFIX) docker
14+
15+
DOCKER_REPO ?= $(DOCKER_STAGE_REPO)
16+
DOCKER_IMAGE ?= remote
17+
DOCKER_TAG ?= master
18+
19+
prepare:
20+
rm -rf $(BUILD_ROOT_PATH) || true
21+
mkdir -p $(GOPATH)/src/github.com/FoxComm
22+
ln -s $(HIGHLANDER_PATH) $(BUILD_ROOT_PATH) || true
23+
$(GLIDE) install
24+
rm -rf $(BUILD_PATH)/vendor/github.com/FoxComm/highlander
25+
26+
build:
27+
$(call header, Building)
28+
make prepare
29+
$(GO) build -o remote main.go
30+
31+
test:
32+
$(call header, Testing)
33+
true
34+
35+
docker:
36+
$(call header, Dockerizing)
37+
$(DOCKER) build -t $(DOCKER_IMAGE) .
38+
39+
docker-push:
40+
$(call header, Registering)
41+
$(DOCKER) tag $(DOCKER_IMAGE) $(DOCKER_REPO)/$(DOCKER_IMAGE):$(DOCKER_TAG)
42+
$(DOCKER) push $(DOCKER_REPO)/$(DOCKER_IMAGE):$(DOCKER_TAG)

remote/glide.lock

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

remote/glide.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package: github.com/FoxComm/highlander/remote
2+
import:
3+
- package: github.com/gin-gonic/gin

0 commit comments

Comments
 (0)