Skip to content

Commit 81a7040

Browse files
authored
Merge pull request #38 from vdice/chore/go-mod
chore(*): update to use Go modules
2 parents 6ac46d8 + 87ef52b commit 81a7040

File tree

807 files changed

+591
-301805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

807 files changed

+591
-301805
lines changed

Gopkg.lock

-436
This file was deleted.

Gopkg.toml

-36
This file was deleted.

Makefile

+10-14
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ MIXIN = arm
22
PKG = get.porter.sh/mixin/$(MIXIN)
33
SHELL = bash
44

5+
GO = GO111MODULE=on go
6+
57
PORTER_HOME ?= $(HOME)/.porter
68

79
COMMIT ?= $(shell git rev-parse --short HEAD)
810
VERSION ?= $(shell git describe --tags 2> /dev/null || echo v0)
911
PERMALINK ?= $(shell git describe --tags --exact-match &> /dev/null && echo latest || echo canary)
1012

1113
LDFLAGS = -w -X $(PKG)/pkg.Version=$(VERSION) -X $(PKG)/pkg.Commit=$(COMMIT)
12-
XBUILD = CGO_ENABLED=0 go build -a -tags netgo -ldflags '$(LDFLAGS)'
14+
XBUILD = CGO_ENABLED=0 $(GO) build -a -tags netgo -ldflags '$(LDFLAGS)'
1315
BINDIR = bin/mixins/$(MIXIN)
1416

1517
CLIENT_PLATFORM ?= $(shell go env GOOS)
@@ -34,19 +36,19 @@ build: build-client build-runtime
3436

3537
build-runtime: generate
3638
mkdir -p $(BINDIR)
37-
GOARCH=$(RUNTIME_ARCH) GOOS=$(RUNTIME_PLATFORM) go build -ldflags '$(LDFLAGS)' -o $(BINDIR)/$(MIXIN)-runtime$(FILE_EXT) ./cmd/$(MIXIN)
39+
GOARCH=$(RUNTIME_ARCH) GOOS=$(RUNTIME_PLATFORM) $(GO) build -ldflags '$(LDFLAGS)' -o $(BINDIR)/$(MIXIN)-runtime$(FILE_EXT) ./cmd/$(MIXIN)
3840

3941
build-client: generate
4042
mkdir -p $(BINDIR)
41-
go build -ldflags '$(LDFLAGS)' -o $(BINDIR)/$(MIXIN)$(FILE_EXT) ./cmd/$(MIXIN)
43+
$(GO) build -ldflags '$(LDFLAGS)' -o $(BINDIR)/$(MIXIN)$(FILE_EXT) ./cmd/$(MIXIN)
4244

4345
generate: packr2
44-
go generate ./...
46+
$(GO) generate ./...
4547

4648
HAS_PACKR2 := $(shell command -v packr2)
4749
packr2:
4850
ifndef HAS_PACKR2
49-
go get -u github.com/gobuffalo/packr/v2/packr2
51+
$(GO) get -u github.com/gobuffalo/packr/v2/packr2
5052
endif
5153

5254
xbuild-all:
@@ -60,22 +62,16 @@ $(BINDIR)/$(VERSION)/$(MIXIN)-$(CLIENT_PLATFORM)-$(CLIENT_ARCH)$(FILE_EXT):
6062
mkdir -p $(dir $@)
6163
GOOS=$(CLIENT_PLATFORM) GOARCH=$(CLIENT_ARCH) $(XBUILD) -o $@ ./cmd/$(MIXIN)
6264

63-
test: test-unit test-templates
65+
test: test-unit
6466
$(BINDIR)/$(MIXIN)$(FILE_EXT) version
6567

6668
test-unit: build
67-
go test ./...
68-
69-
test-templates: jsonpp
70-
@for template in $$(ls pkg/arm/arm/templates); do \
71-
echo "ensuring valid json: $$template" ; \
72-
cat pkg/arm/arm/templates/$$template | json_pp > /dev/null ; \
73-
done
69+
$(GO) test ./...
7470

7571
HAS_JSONPP := $(shell command -v jsonpp)
7672
jsonpp:
7773
ifndef HAS_JSONPP
78-
go get -u github.com/jmhodges/jsonpp
74+
$(GO) get -u github.com/jmhodges/jsonpp
7975
endif
8076

8177
publish: bin/porter$(FILE_EXT)

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pool:
1414

1515
variables:
1616
GOBIN: '$(GOPATH)/bin' # Go binaries path
17-
GOROOT: '/usr/local/go1.11' # Go installation path
17+
GOROOT: '/usr/local/go1.13' # Go installation path
1818
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
1919
modulePath: '$(GOPATH)/src/get.porter.sh/mixin/arm' # Path to the module's cod
2020

go.mod

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module get.porter.sh/mixin/arm
2+
3+
go 1.13
4+
5+
require (
6+
get.porter.sh/porter v0.22.1-beta.1
7+
github.com/Azure/azure-sdk-for-go v38.2.0+incompatible
8+
github.com/Azure/go-autorest v12.2.0+incompatible
9+
github.com/Azure/go-autorest/autorest v0.9.0
10+
github.com/Azure/go-autorest/autorest/adal v0.5.0
11+
github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect
12+
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
13+
github.com/Masterminds/goutils v1.1.0 // indirect
14+
github.com/Masterminds/sprig v2.22.0+incompatible
15+
github.com/gobuffalo/packr/v2 v2.7.1
16+
github.com/huandu/xstrings v1.3.0 // indirect
17+
github.com/kelseyhightower/envconfig v1.4.0
18+
github.com/mitchellh/copystructure v1.0.0 // indirect
19+
github.com/pkg/errors v0.8.1
20+
github.com/spf13/cobra v0.0.5
21+
github.com/stretchr/testify v1.4.0
22+
gopkg.in/yaml.v2 v2.2.4
23+
)
24+
25+
replace github.com/hashicorp/go-plugin => github.com/carolynvs/go-plugin v1.0.1-acceptstdin

go.sum

+553
Large diffs are not rendered by default.

pkg/arm/templates/arm.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func (d *deployer) Delete(
268268
err,
269269
)
270270
}
271-
if err := result.WaitForCompletion(
271+
if err := result.WaitForCompletionRef(
272272
ctx,
273273
d.deploymentsClient.Client,
274274
); err != nil {
@@ -386,7 +386,7 @@ func (d *deployer) doDeployment(
386386
return nil, fmt.Errorf("error submitting ARM template: %s", err)
387387
}
388388

389-
if err = result.WaitForCompletion(
389+
if err = result.WaitForCompletionRef(
390390
ctx,
391391
d.deploymentsClient.Client,
392392
); err != nil {

vendor/get.porter.sh/porter/LICENSE

-21
This file was deleted.

vendor/get.porter.sh/porter/docs/themes/porter/assets

-1
This file was deleted.

vendor/get.porter.sh/porter/pkg/context/context.go

-152
This file was deleted.

vendor/get.porter.sh/porter/pkg/context/doc.go

-1
This file was deleted.

0 commit comments

Comments
 (0)