-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
f031695
commit a345aac
Showing
7 changed files
with
29 additions
and
140 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
gopkg.in/alecthomas/kingpin.v1 55a69a226d28a43b913720f5d765706d49c8fa9e | ||
gopkg.in/yaml.v2 49c95bdc21843256fb6c4e0d370a05f24a0bf213 | ||
github.com/stretchr/objx cbeaeb16a013161a98496fad62933b1d21786672 | ||
github.com/daryl/cash 0cc867cf30758029421e9958774f39a67bfea88d | ||
github.com/samalba/dockerclient adc6ab28ecbe4ab3b6bd04c68cbf8fa9b21a2684 | ||
github.com/Sirupsen/logrus aaf92c95712104318fc35409745f1533aa5ff327 | ||
github.com/nickschuch/go-tutum 356494f2fb34ff79ac1b012a89177dda95b5918f | ||
github.com/stretchr/testify e22aedd37671fb115be6c0c25129c405cb575cfd | ||
github.com/BurntSushi/toml 056c9bc7be7190eaa7715723883caffa5f8fa3e4 | ||
github.com/alecthomas/units 6b4e7dc5e3143b85ea77909c72caf89416fc2915 |
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,58 +1,44 @@ | ||
#!/usr/bin/make -f | ||
|
||
PROJCET=marco | ||
SHELL=/bin/bash | ||
MKDIR=mkdir | ||
GIT=git | ||
GO=go | ||
RM=rm -rf | ||
CROSS=https://github.com/davecheney/golang-crosscompile.git | ||
CROSS_BASH=source golang-crosscompile/crosscompile.bash | ||
CROSS_BASH=source /opt/golang/cross/crosscompile.bash | ||
|
||
SOURCE=main.go | ||
TARGETS=darwin-386 darwin-amd64 linux-386 linux-amd64 linux-arm | ||
|
||
all: test | ||
|
||
build: deps | ||
@echo "Building marco..." | ||
@$(GO) build -o bin/marco $(SOURCE) | ||
@echo "Building..." | ||
@$(GO) build -o bin/$(PROJCET) $(SOURCE) | ||
|
||
deps: | ||
@echo "Downloading libraries..." | ||
@$(GO) get github.com/stretchr/objx | ||
@$(GO) get github.com/daryl/cash | ||
@$(GO) get github.com/samalba/dockerclient | ||
@$(GO) get github.com/Sirupsen/logrus | ||
@$(GO) get github.com/nickschuch/go-tutum/tutum | ||
@$(GO) get gopkg.in/alecthomas/kingpin.v1 | ||
@$(GO) get github.com/stretchr/testify/assert | ||
|
||
golang-crosscompile: | ||
$(GIT) clone $(CROSS) | ||
$(CROSS_BASH) && \ | ||
go-crosscompile-build-all | ||
|
||
xbuild: deps golang-crosscompile dirs | ||
go-getter Gofile | ||
|
||
xbuild: deps dirs | ||
@for target in $(TARGETS); do \ | ||
echo "Building marco for $$target..."; \ | ||
echo "Building for $$target..."; \ | ||
$(CROSS_BASH) && \ | ||
$(GO)-$$target build -o bin/marco-$$target $(SOURCE); \ | ||
$(GO)-$$target build -o bin/$(PROJCET)-$$target $(SOURCE); \ | ||
done; | ||
|
||
dirs: | ||
@$(MKDIR) -p bin | ||
|
||
test: build | ||
@echo "Run tests..." | ||
@echo "Running tests..." | ||
@$(GO) test ./... | ||
|
||
clean: | ||
@echo "Cleanup binaries..." | ||
@echo "Cleaning up binaries..." | ||
$(RM) bin | ||
|
||
realclean: clean | ||
$(RM) golang-crosscompile | ||
|
||
coverage: | ||
# This is a script provided by upstream. We won't to need this in 1.5 of Golang. | ||
scripts/coverage.sh | ||
@echo "Build code coverage..." | ||
coverage |
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,19 +1,5 @@ | ||
# Backup | ||
# | ||
# Provides a local development environment for Marco. | ||
# | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.box = "ubuntu/trusty64" | ||
config.vm.box = "nickschuch/go" | ||
config.vm.host_name = "marco.dev" | ||
|
||
config.vm.network :private_network, :ip => "192.168.80.10" | ||
|
||
config.vm.synced_folder ".", "/opt/golang/src/github.com/nickschuch/marco" | ||
|
||
config.vm.provider :virtualbox do |vb| | ||
vb.customize ["modifyvm", :id, "--memory", 1024] | ||
end | ||
|
||
config.vm.provision "shell", path: "scripts/provision.sh" | ||
end |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build: | ||
image: "nickschuch/local-go" | ||
working_dir: "/opt/golang/src/github.com/nickschuch/marco" | ||
volumes: | ||
- ".:/opt/golang/src/github.com/nickschuch/marco" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.