Skip to content

Commit

Permalink
v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedric Hauber committed Mar 29, 2017
1 parent 9b90ccc commit bc4660e
Show file tree
Hide file tree
Showing 57 changed files with 477 additions and 2,298 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
*.o
*.a
*.so

.idea
# Folders
_obj
_test

vendor
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
Expand Down
23 changes: 23 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Glide
The Masterminds
Copyright (C) 2014-2016, Matt Butcher and Matt Farina
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2015, Google

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
17 changes: 6 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
GOOS := darwin
GOARCH := amd64
GOPATH := $(shell pwd)
LGOBIN := $(shell pwd)/bin
ENVS := GOOS=$(GOOS) GOARCH=$(GOARCH) GOPATH=$(GOPATH) LGOBIN=$(LGOBIN)
.PHONY: core glide test update_deps docker_build docker_pre docker_deps docker_deploy

default: core

core:
$(ENVS) go build -o bin/pidalio-$(GOOS)-$(GOARCH) github.com/cedbossneo/pidalio
$(ENVS) go build -o bin/pidalio-$(GOOS)-$(GOARCH)

docker_pre:
docker build -t pidalio-build -f dockerfiles/build/Dockerfile dockerfiles/build/

docker_deps: docker_pre
docker run --rm -v "$(PWD)":/usr/src/myapp -w /usr/src/myapp pidalio-build make GOOS=linux deps
docker run --rm -v "$(PWD)":/go/src/github.com/cedbossneo/pidalio -w /go/src/github.com/cedbossneo/pidalio pidalio-build make GOOS=linux deps

docker_build: docker_deps
docker run --rm -v "$(PWD)":/usr/src/myapp -w /usr/src/myapp pidalio-build make GOOS=linux
docker run --rm -v "$(PWD)":/go/src/github.com/cedbossneo/pidalio -w /go/src/github.com/cedbossneo/pidalio pidalio-build make GOOS=linux

docker_deploy: docker_build
cp -f bin/pidalio-linux-amd64 dockerfiles/deploy/
Expand All @@ -33,14 +32,10 @@ deps:
echo "Glide not installed, downloading" ; \
curl -s -L https://github.com/Masterminds/glide/releases/download/v0.11.1/glide-v0.11.1-$(GOOS)-$(GOARCH).tar.gz | tar -xz --strip=1 && mv ./glide bin/glide ; \
fi ; \
cd src/github.com/cedbossneo/pidalio ; \
$(ENVS) $(LGOBIN)/glide install; \
cd ../../../..;
$(ENVS) $(LGOBIN)/glide install;

update_deps:
cd src/github.com/cedbossneo/pidalio ; \
$(ENVS) $(LGOBIN)/glide update; \
cd ../../../..;
$(ENVS) $(LGOBIN)/glide update;

test:
$(ENVS) go test -v github.com/cedbossneo/pidalio/test/...
$(ENVS) go test -v ...
Loading

0 comments on commit bc4660e

Please sign in to comment.