vinyldns / go-vinyldns

Go client package for VinylDNS
Apache License 2.0
7 stars 25 forks source link

Run `bin/docker-up-vinyldns.sh` from a specific VinylDNS release branch #49

Closed mdb closed 4 years ago

mdb commented 4 years ago

When running the make acceptance tests, currently go-vinyldns starts a Dockerized VinylDNS API version via VinylDNS's bin/docker-up-vinyldns.sh script. It would be good to run this script from a specific VinylDNS branch version. While this is not the most elegant implementation, I'm imagining something like the following may still be an improvement, for example:

  if [ ! -d "$(GOPATH)/src/$(VINYLDNS_REPO)" ]; then \
    echo "$(VINYLDNS_REPO) not found in your GOPATH (necessary for acceptance tests), getting..."; \
    git clone \
      --branch v0.9.1 \
      https://$(VINYLDNS_REPO) \
      $(GOPATH)/src/$(VINYLDNS_REPO); \
  fi
  if [[ $(shell git --git-dir $(GOPATH)/src/$(VINYLDNS_REPO)/.git rev-parse HEAD)" != "12c6d4e67cf92d5be9801630155d640f55a38f51" ]]; then
    rm -rf $(GOPATH)/src/$(VINYLDNS_REPO);
    git clone \
      --branch v0.9.1 \
      https://$(VINYLDNS_REPO) \
      $(GOPATH)/src/$(VINYLDNS_REPO); \
  fi
  $(GOPATH)/src/$(VINYLDNS_REPO)/bin/docker-up-vinyldns.sh \
  --api-only \
  --version 0.9.1