Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 0.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilde committed Oct 25, 2017
2 parents 7516d9d + adc1412 commit 506148a
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
46 changes: 46 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)

default: build

test: fmtcheck
go test -v . ./plugin/providers/runscope

testacc: fmtcheck
@test "${RUNSCOPE_ACCESS_TOKEN}" || (echo '$$RUNSCOPE_ACCESS_TOKEN required' && exit 1)
@test "${RUNSCOPE_TEAM_ID}" || (echo '$$RUNSCOPE_TEAM_ID required' && exit 1)

TF_ACC=1 go test -v ./plugin/providers/runscope -run="TestAcc" -timeout 20m

build: deps fmtcheck vet
gox -osarch="linux/amd64 windows/amd64 darwin/amd64" \
-output="pkg/{{.OS}}_{{.Arch}}/terraform-provider-runscope" .

release:
@test "${VERSION}" || (echo 'VERSION name required' && exit 1)
rm -f pkg/darwin_amd64/terraform-provider-runscope_${VERSION}_darwin_amd64.zip
zip pkg/darwin_amd64/terraform-provider-runscope_${VERSION}_darwin_amd64.zip pkg/darwin_amd64/terraform-provider-runscope
rm -f pkg/linux_amd64/terraform-provider-runscope_${VERSION}_linux_amd64.zip
zip pkg/linux_amd64/terraform-provider-runscope_${VERSION}_linux_amd64.zip pkg/linux_amd64/terraform-provider-runscope
rm -f pkg/windows_amd64/terraform-provider-runscope_${VERSION}_windows_amd64.zip
zip pkg/windows_amd64/terraform-provider-runscope_${VERSION}_windows_amd64.zip pkg/windows_amd64/terraform-provider-runscope.exe
deps:
go get -u github.com/mitchellh/gox

clean:
rm -rf pkg/
fmt:
gofmt -w $(GOFMT_FILES)

fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"

vet:
@echo "go vet ."
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
exit 1; \
fi

.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile
9 changes: 7 additions & 2 deletions runscope/resource_runscope_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,13 @@ func resourceEnvironmentUpdate(d *schema.ResourceData, meta interface{}) error {
return fmt.Errorf("Error updating environment: %s", err)
}

change := d.HasChange("name")
if change {
if d.HasChange("name") ||
d.HasChange("script") ||
d.HasChange("preserve_cookies") ||
d.HasChange("initial_variables") ||
d.HasChange("integrations") ||
d.HasChange("regions") ||
d.HasChange("remote_agents") {
client := meta.(*runscope.Client)
bucketId := d.Get("bucket_id").(string)
if testId, ok := d.GetOk("test_id"); ok {
Expand Down

0 comments on commit 506148a

Please sign in to comment.