Skip to content

Commit 052d10f

Browse files
authored
Merge pull request #345 from replicatedhq/divolgin/images
use containers package instead of go-containerregistry
2 parents 1dc03db + 7a0c6e5 commit 052d10f

File tree

5 files changed

+243
-121
lines changed

5 files changed

+243
-121
lines changed

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ define LDFLAGS
3535
"
3636
endef
3737

38+
BUILDFLAGS = -tags "netgo containers_image_ostree_stub exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp" -installsuffix netgo
39+
3840
all: test
3941

4042
.PHONY: ffi
@@ -43,27 +45,27 @@ ffi: fmt vet
4345

4446
# Run tests
4547
test: generate fmt vet
46-
go test ./pkg/... ./cmd/... -coverprofile cover.out
48+
go test ${BUILDFLAGS} ./pkg/... ./cmd/... -coverprofile cover.out
4749

4850
.PHONY: support-bundle
4951
support-bundle: generate fmt vet
50-
go build -tags netgo ${LDFLAGS} -o bin/support-bundle github.com/replicatedhq/troubleshoot/cmd/troubleshoot
52+
go build ${BUILDFLAGS} ${LDFLAGS} -o bin/support-bundle github.com/replicatedhq/troubleshoot/cmd/troubleshoot
5153

5254
.PHONY: preflight
5355
preflight: generate fmt vet
54-
go build -tags netgo ${LDFLAGS} -o bin/preflight github.com/replicatedhq/troubleshoot/cmd/preflight
56+
go build ${BUILDFLAGS} ${LDFLAGS} -o bin/preflight github.com/replicatedhq/troubleshoot/cmd/preflight
5557

5658
.PHONY: analyze
5759
analyze: generate fmt vet
58-
go build -tags netgo ${LDFLAGS} -o bin/analyze github.com/replicatedhq/troubleshoot/cmd/analyze
60+
go build ${BUILDFLAGS} ${LDFLAGS} -o bin/analyze github.com/replicatedhq/troubleshoot/cmd/analyze
5961

6062
.PHONY: fmt
6163
fmt:
6264
go fmt ./pkg/... ./cmd/...
6365

6466
.PHONY: vet
6567
vet:
66-
go vet ./pkg/... ./cmd/...
68+
go vet ${BUILDFLAGS} ./pkg/... ./cmd/...
6769

6870
.PHONY: generate
6971
generate: controller-gen client-gen

go.mod

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ module github.com/replicatedhq/troubleshoot
33
go 1.12
44

55
require (
6+
cloud.google.com/go v0.57.0 // indirect
67
github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 // indirect
78
github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412
89
github.com/aws/aws-sdk-go v1.25.18 // indirect
910
github.com/blang/semver v3.5.1+incompatible
1011
github.com/chzyer/logex v1.1.11-0.20160617073814-96a4d311aa9b // indirect
12+
github.com/containers/image/v5 v5.10.4
13+
github.com/docker/distribution v2.7.1+incompatible
1114
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
1215
github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 // indirect
1316
github.com/emicklei/go-restful v2.9.6+incompatible // indirect
@@ -18,29 +21,29 @@ require (
1821
github.com/go-sql-driver/mysql v1.5.0
1922
github.com/gobwas/glob v0.2.3
2023
github.com/godbus/dbus v4.1.0+incompatible
21-
github.com/google/go-containerregistry v0.4.1
2224
github.com/google/gofuzz v1.1.0
23-
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
2425
github.com/hashicorp/go-getter v1.3.1-0.20190627223108-da0323b9545e
25-
github.com/hashicorp/go-multierror v1.0.0
26+
github.com/hashicorp/go-multierror v1.1.1
27+
github.com/kr/text v0.2.0 // indirect
2628
github.com/lib/pq v1.3.0
27-
github.com/manifoldco/promptui v0.3.2
29+
github.com/manifoldco/promptui v0.8.0
2830
github.com/mattn/go-colorable v0.1.4 // indirect
2931
github.com/mattn/go-isatty v0.0.9
3032
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
31-
github.com/nicksnyder/go-i18n v1.10.1 // indirect
33+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
3234
github.com/pkg/errors v0.9.1
3335
github.com/replicatedhq/termui/v3 v3.1.1-0.20200811145416-f40076d26851
3436
github.com/segmentio/ksuid v1.0.3
3537
github.com/shirou/gopsutil v3.21.1+incompatible
3638
github.com/spf13/cobra v1.1.1
3739
github.com/spf13/pflag v1.0.5
3840
github.com/spf13/viper v1.7.0
39-
github.com/stretchr/testify v1.6.1
41+
github.com/stretchr/testify v1.7.0
4042
github.com/tj/go-spin v1.1.0
41-
github.com/ulikunitz/xz v0.5.6 // indirect
43+
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a // indirect
4244
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect
43-
gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780 // indirect
45+
golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3 // indirect
46+
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
4447
gopkg.in/yaml.v2 v2.3.0
4548
k8s.io/api v0.20.2
4649
k8s.io/apiextensions-apiserver v0.20.2

0 commit comments

Comments
 (0)