Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Commit

Permalink
adding makefile, adding vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram Vogelaar committed Mar 6, 2017
1 parent 1da1fb0 commit 0d299f7
Show file tree
Hide file tree
Showing 71 changed files with 7,656 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vendor/
release/
marten
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: go
go:
- 1.7
- 1.8
script: make test
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
VERSION=$(shell git describe --tags)
GODEP_PATH=$(shell pwd)/vendor
ORIGINAL_PATH=$(shell echo $(GOPATH))
COMBINED_GOPATH=$(GODEP_PATH):$(ORIGINAL_PATH)

.PHONY: build clean test package release

build:
GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version=$(VERSION)" -o marten ./cmd

clean:
rm -rf release/
rm -rf marten

test:
echo "Testing with" `go version`
GOMAXPROCS=4 GOPATH=$(COMBINED_GOPATH) go test -cover ./toxics

package:
mkdir -p release
GOOS=linux GOARCH=amd64 GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version=$(VERSION)" -o "release/marten_linux_amd64" ./cmd

release: clean package
File renamed without changes.
2 changes: 1 addition & 1 deletion response.go → toxics/response.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package toxics

import (
"bufio"
Expand Down
14 changes: 14 additions & 0 deletions toxics/response_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package toxics_test

import (
"testing"
"github.com/stretchr/testify/assert"
)

func TestSomething(t *testing.T) {

var a string = "Hello"
var b string = "Hello"

assert.Equal(t, a, b, "The two words should be the same.")
}
12 changes: 12 additions & 0 deletions vendor/github.com/Shopify/toxiproxy/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions vendor/github.com/Shopify/toxiproxy/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

166 changes: 166 additions & 0 deletions vendor/github.com/Shopify/toxiproxy/CREATING_TOXICS.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions vendor/github.com/Shopify/toxiproxy/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/github.com/Shopify/toxiproxy/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0d299f7

Please sign in to comment.