Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,223 changes: 0 additions & 1,223 deletions Gopkg.lock

This file was deleted.

90 changes: 0 additions & 90 deletions Gopkg.toml

This file was deleted.

60 changes: 15 additions & 45 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,9 @@
GIT_HOST = sigs.k8s.io
PWD := $(shell pwd)
BASE_DIR := $(shell basename $(PWD))
# Keep an existing GOPATH, make a private one if it is undefined
GOPATH_DEFAULT := $(PWD)/.go
export GOPATH ?= $(GOPATH_DEFAULT)
GOBIN_DEFAULT := $(GOPATH)/bin
export GOBIN ?= $(GOBIN_DEFAULT)
TESTARGS_DEFAULT := "-v"
export TESTARGS ?= $(TESTARGS_DEFAULT)
PKG := $(shell awk -F "\"" '/^ignored = / { print $$2 }' Gopkg.toml)
DEST := $(GOPATH)/src/$(GIT_HOST)/$(BASE_DIR)
SOURCES := $(shell find $(DEST) -name '*.go')

HAS_DEP := $(shell command -v dep;)
HAS_LINT := $(shell command -v golint;)
HAS_GOX := $(shell command -v gox;)
HAS_YQ := $(shell command -v yq;)
Expand All @@ -33,46 +24,29 @@ TAGS :=
LDFLAGS := "-w -s -X 'main.version=${VERSION}'"
REGISTRY ?= k8scloudprovider

ifneq ("$(realpath $(DEST))", "$(realpath $(PWD))")
$(error Please run 'make' from $(DEST). Current directory is $(PWD))
endif

# CTI targets

$(GOBIN):
echo "create gobin"
mkdir -p $(GOBIN)

work: $(GOBIN)

depend: work
ifndef HAS_DEP
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
endif
dep ensure

depend-update: work
dep ensure -update
.PHONY: vendor
vendor: ## Runs go mod to ensure proper vendoring.
./hack/update-vendor.sh

build: binary images

binary: manager clusterctl

manager:
GO111MODULE=off CGO_ENABLED=0 GOOS=$(GOOS) go build -v \
CGO_ENABLED=0 GOOS=$(GOOS) go build -v \
-ldflags $(LDFLAGS) \
-o bin/manager \
cmd/manager/main.go

clusterctl:
GO111MODULE=off CGO_ENABLED=0 GOOS=$(GOOS) go build \
CGO_ENABLED=0 GOOS=$(GOOS) go build \
-ldflags $(LDFLAGS) \
-o bin/clusterctl \
cmd/clusterctl/main.go

test: unit functional generate_yaml_test

check: depend fmt vet lint
check: vendor fmt vet lint

generate_yaml_test:
ifndef HAS_YQ
Expand All @@ -86,8 +60,8 @@ endif
rm -fr $(GENERATE_YAML_PATH)/$(GENERATE_YAML_TEST_FOLDER)
rm dummy-clouds-test.yaml

unit: generate depend
go test -tags=unit $(shell go list ./...) $(TESTARGS)
unit: generate vendor
go test -tags=unit ./pkg/... ./cmd/... $(TESTARGS)

functional:
@echo "$@ not yet implemented"
Expand All @@ -103,10 +77,10 @@ endif
hack/verify-golint.sh

vet:
go vet ./...
go vet ./pkg/... ./cmd/...

cover: generate depend
go test -tags=unit $(shell go list ./...) -cover
cover: generate vendor
go test -tags=unit ./pkg/... ./cmd/... -cover

docs:
@echo "$@ not yet implemented"
Expand All @@ -126,10 +100,6 @@ translation:
env:
@echo "PWD: $(PWD)"
@echo "BASE_DIR: $(BASE_DIR)"
@echo "GOPATH: $(GOPATH)"
@echo "GOROOT: $(GOROOT)"
@echo "DEST: $(DEST)"
@echo "PKG: $(PKG)"
go version
go env

Expand All @@ -154,10 +124,10 @@ manifests:

images: openstack-cluster-api-controller clusterctl-image

openstack-cluster-api-controller: generate fmt vet manifests
openstack-cluster-api-controller: generate manifests
docker build . -f cmd/manager/Dockerfile --network=host -t "$(REGISTRY)/openstack-cluster-api-controller:$(VERSION)"

clusterctl-image: generate fmt vet manifests
clusterctl-image: generate manifests
docker build . -f cmd/clusterctl/Dockerfile --network=host -t "$(REGISTRY)/openstack-cluster-api-clusterctl:$(VERSION)"

upload-images: images
Expand All @@ -171,7 +141,7 @@ version:

.PHONY: build-cross
build-cross: LDFLAGS += -extldflags "-static"
build-cross: depend
build-cross: vendor
ifndef HAS_GOX
go get -u github.com/mitchellh/gox
endif
Expand All @@ -187,5 +157,5 @@ dist: build-cross
$(DIST_DIRS) zip -r cluster-api-provider-openstack-$(VERSION)-{}.zip {} \; \
)

.PHONY: build clean cover depend docs fmt functional lint realclean \
.PHONY: build clean cover vendor docs fmt functional lint realclean \
relnotes test translation version build-cross dist manifests
72 changes: 72 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
module sigs.k8s.io/cluster-api-provider-openstack

go 1.12

require (
cloud.google.com/go v0.40.0 // indirect
github.com/Azure/go-autorest/autorest v0.5.0 // indirect
github.com/ajeddeloh/go-json v0.0.0-20170920214419-6a2fe990e083 // indirect
github.com/ajeddeloh/yaml v0.0.0-20170912190910-6b94386aeefd // indirect
github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 // indirect
github.com/coreos/container-linux-config-transpiler v0.9.0
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
github.com/coreos/ignition v0.32.0 // indirect
github.com/go-logr/logr v0.1.0 // indirect
github.com/go-logr/zapr v0.1.1 // indirect
github.com/gobuffalo/envy v1.7.0 // indirect
github.com/gogo/protobuf v1.2.1 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/gofuzz v1.0.0 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/googleapis/gnostic v0.3.0 // indirect
github.com/gophercloud/gophercloud v0.3.0
github.com/gophercloud/utils v0.0.0-20190527093828-25f1b77b8c03
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.9.1 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/markbates/inflect v1.0.4 // indirect
github.com/pborman/uuid v1.2.0 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v0.9.4 // indirect
github.com/rogpeppe/go-internal v1.3.0 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v0.0.5 // indirect
github.com/vincent-petithory/dataurl v0.0.0-20160330182126-9a301d65acbb // indirect
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.10.0 // indirect
go4.org v0.0.0-20190313082347-94abd6928b1d // indirect
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 // indirect
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 // indirect
google.golang.org/appengine v1.6.1 // indirect
google.golang.org/genproto v0.0.0-20190611190212-a7e196e89fd3 // indirect
google.golang.org/grpc v1.21.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.2.2
k8s.io/api v0.0.0-20190612125737-db0771252981
k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236 // indirect
k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad
k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4
k8s.io/cluster-bootstrap v0.0.0-20190612131323-aa3fd9f69a09
k8s.io/code-generator v0.0.0-20190612125529-c522cb6c26aa
k8s.io/component-base v0.0.0-20190615090122-7edc45fbd48e // indirect
k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a // indirect
k8s.io/klog v0.3.3
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 // indirect
sigs.k8s.io/cluster-api v0.1.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously it's branch release-0.1 now it's a tag ? just want to make sure understand is correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, The go.mod file generally use semantics versions which is introduced by tagging a revision in the underlying source repository.
https://golang.org/cmd/go/#hdr-Pseudo_versions

sigs.k8s.io/controller-runtime v0.1.12
sigs.k8s.io/controller-tools v0.1.11
sigs.k8s.io/testing_frameworks v0.1.1
sigs.k8s.io/yaml v1.1.0
)

replace (
k8s.io/api => k8s.io/api v0.0.0-20190222213804-5cb15d344471
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628
)
Loading