diff --git a/Makefile b/Makefile index 7fffb3fe..2d2d2286 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ COMBINED_GOPATH=$(GODEP_PATH):$(ORIGINAL_PATH) .PHONY: packages deb test linux darwin windows build: - GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version git-$(git rev-parse --short HEAD)" -o toxiproxy ./cmd + GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version=git-$(shell git rev-parse --short HEAD)" -o toxiproxy ./cmd all: deb linux darwin windows deb: $(DEB) @@ -25,13 +25,13 @@ test: GOMAXPROCS=4 GOPATH=$(COMBINED_GOPATH) go test -v -race ./... tmp/build/toxiproxy-linux-amd64: - GOOS=linux GOARCH=amd64 GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version $(VERSION)" -o $(@) ./cmd + GOOS=linux GOARCH=amd64 GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version=$(VERSION)" -o $(@) ./cmd tmp/build/toxiproxy-darwin-amd64: - GOOS=darwin GOARCH=amd64 GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version $(VERSION)" -o $(@) ./cmd + GOOS=darwin GOARCH=amd64 GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version=$(VERSION)" -o $(@) ./cmd tmp/build/toxiproxy-windows-amd64.exe: - GOOS=windows GOARCH=amd64 GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version $(VERSION)" -o $(@) ./cmd + GOOS=windows GOARCH=amd64 GOPATH=$(COMBINED_GOPATH) go build -ldflags="-X github.com/Shopify/toxiproxy.Version=$(VERSION)" -o $(@) ./cmd docker: docker build --tag="shopify/toxiproxy:$(VERSION)" . diff --git a/README.md b/README.md index b9e3a189..b78d67b8 100644 --- a/README.md +++ b/README.md @@ -456,7 +456,7 @@ Content-Length: 108 ``` ```bash -$ curl -i -d '{"type":"latency", "latency":1000}' localhost:8474/proxies/redis/toxics +$ curl -i -d '{"type":"latency", "latency":1000}' localhost:8474/proxies/redis/toxics HTTP/1.1 200 OK Content-Type: application/json Date: Fri, 21 Aug 2015 19:05:19 GMT @@ -529,6 +529,7 @@ For example, `shopify_test_redis_master` or `shopify_development_mysql_1`. ### Development +* `make`. Build a toxiproxy development binary for the current platform. * `make all`. Build Toxiproxy binaries and packages for all platforms. Requires to have Go compiled with cross compilation enabled on Linux and Darwin (amd64) as well as [`fpm`](https://github.com/jordansissel/fpm) in your `$PATH` to @@ -536,6 +537,7 @@ For example, `shopify_test_redis_master` or `shopify_development_mysql_1`. * `make test`. Run the Toxiproxy tests. * `make darwin`. Build binary for Darwin. * `make linux`. Build binary for Linux. +* `make windows`. Build binary for Windows. ### Release @@ -544,7 +546,7 @@ For example, `shopify_test_redis_master` or `shopify_development_mysql_1`. 3. Change versions in `README.md` 4. Commit 5. Tag -6. `make` to create binaries, packages and push new Docker image +6. `make release` to create binaries, packages and push new Docker image 7. Create [Github draft release](https://github.com/Shopify/toxiproxy/releases/new) against new tag and upload binaries and Debian package 8. [Bump version for Homebrew](https://github.com/Shopify/homebrew-shopify/blob/master/toxiproxy.rb#L9)