From 4c8738f58552923f9f5e9a5b2ad7b977c4ac0512 Mon Sep 17 00:00:00 2001 From: Protocol Labs Date: Mon, 20 May 2019 14:38:34 +0300 Subject: [PATCH] Fix #765 Added needed gx references --- Makefile | 34 ++++++++++++++++++++++++++++++++++ api/rest/client/README.md | 6 +----- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5e13c682..277b4d54 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ deptools=deptools sharness = sharness/lib/sharness +gx=$(deptools)/gx +gx-go=$(deptools)/gx-go export PATH := $(deptools):$(PATH) @@ -10,9 +12,37 @@ clean: rwundo clean_sharness @rm -rf ./test/testingData @rm -rf ./compose +install: gx-deps + $(MAKE) -C cmd/ipfs-cluster-service install + $(MAKE) -C cmd/ipfs-cluster-ctl install + +docker_install: docker_gx-deps + $(MAKE) -C cmd/ipfs-cluster-service install + $(MAKE) -C cmd/ipfs-cluster-ctl install + +build: gx-deps + go build -ldflags "-X ipfscluster.Commit=$(shell git rev-parse HEAD)" + $(MAKE) -C cmd/ipfs-cluster-service build + $(MAKE) -C cmd/ipfs-cluster-ctl build + +service: gx-deps + $(MAKE) -C cmd/ipfs-cluster-service ipfs-cluster-service +ctl: gx-deps + $(MAKE) -C cmd/ipfs-cluster-ctl ipfs-cluster-ctl + +check: + go vet ./... + golint -set_exit_status -min_confidence 0.3 ./... + +test: gx-deps + go test -v ./... + test_sharness: $(sharness) @sh sharness/run-sharness-tests.sh +test_problem: gx-deps + go test -timeout 20m -loglevel "DEBUG" -v -run $(problematic_test) + $(sharness): @echo "Downloading sharness" @curl -L -s -o sharness/lib/sharness.tar.gz http://github.com/chriscool/sharness/archive/8fa4b9b0465d21b7ec114ec4528fa17f5a6eb361.tar.gz @@ -46,3 +76,7 @@ docker-compose: docker exec cluster0 ipfs-cluster-ctl peers ls | grep -o "Sees 1 other peers" | uniq -c | grep 2 docker exec cluster1 ipfs-cluster-ctl peers ls | grep -o "Sees 1 other peers" | uniq -c | grep 2 docker-compose down + +prcheck: gx-deps check service ctl test + +.PHONY: all gx gx-deps test test_sharness clean_sharness rw rwundo publish service ctl install clean gx-clean docker \ No newline at end of file diff --git a/api/rest/client/README.md b/api/rest/client/README.md index 51803538..9e366c68 100644 --- a/api/rest/client/README.md +++ b/api/rest/client/README.md @@ -25,11 +25,7 @@ This is a Go client library to use the ipfs-cluster REST HTTP API. ## Install -You can import `github.com/ipfs/ipfs-cluster/api/rest/client` in your code. If you wish to use [`gx`](https://github.com/whyrusleeping/gx-go) for dependency management, it can be imported with: - -``` -$ gx import github.com/ipfs/ipfs-cluster/ -``` +You can import `github.com/ipfs/ipfs-cluster/api/rest/client` in your code. The code can be downloaded and tested with: