Skip to content

Commit

Permalink
Merge pull request #10898 from hashicorp/f-rm-vendor
Browse files Browse the repository at this point in the history
build: no longer use vendor directory
  • Loading branch information
shoenig committed Jul 14, 2021
2 parents 8d0e319 + ec6eaac commit 7c962b5
Show file tree
Hide file tree
Showing 5,628 changed files with 6 additions and 1,915,803 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .changelog/10898.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
build: no longer use vendor directory
```
16 changes: 3 additions & 13 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,15 @@ check: ## Lint the source code
@if (git status -s | grep -q -e '\.hcl$$' -e '\.nomad$$'); then echo the following HCL files are out of sync; git status -s | grep -e '\.hcl$$' -e '\.nomad$$'; exit 1; fi

@echo "==> Check API package is isolated from rest"
@cd ./api && if go list --test -f '{{ join .Deps "\n" }}' . | grep github.com/hashicorp/nomad/ | grep -v -e /vendor/ -e /nomad/api/ -e nomad/api.test; then echo " /api package depends the ^^ above internal nomad packages. Remove such dependency"; exit 1; fi
@cd ./api && if go list --test -f '{{ join .Deps "\n" }}' . | grep github.com/hashicorp/nomad/ | grep -v -e /nomad/api/ -e nomad/api.test; then echo " /api package depends the ^^ above internal nomad packages. Remove such dependency"; exit 1; fi

@echo "==> Checking Go mod.."
@GO111MODULE=on $(MAKE) sync
@GO111MODULE=on $(MAKE) tidy
@if (git status --porcelain | grep -Eq "go\.(mod|sum)"); then \
echo go.mod or go.sum needs updating; \
git --no-pager diff go.mod; \
git --no-pager diff go.sum; \
exit 1; fi
@if (git status --porcelain | grep -Eq "vendor/github.com/hashicorp/nomad/.*\.go"); then \
echo "nomad go submodules are out of sync, try 'make sync':"; \
git status -s | grep -E "vendor/github.com/hashicorp/nomad/.*\.go"; \
exit 1; fi

@echo "==> Check raft util msg type mapping are in-sync..."
@go generate ./helper/raftutil/
Expand All @@ -187,7 +183,7 @@ checkproto: ## Lint protobuf files
generate-all: generate-structs proto generate-examples

.PHONY: generate-structs
generate-structs: LOCAL_PACKAGES = $(shell go list ./... | grep -v '/vendor/')
generate-structs: LOCAL_PACKAGES = $(shell go list ./...)
generate-structs: ## Update generated code
@echo "--> Running go generate..."
@go generate $(LOCAL_PACKAGES)
Expand All @@ -206,7 +202,6 @@ command/job_init.bindata_assetfs.go: command/assets/*
changelog:
@changelog-build -last-release $(LAST_RELEASE) -this-release HEAD \
-entries-dir .changelog/ -changelog-template ./.changelog/changelog.tmpl -note-template ./.changelog/note.tmpl


## We skip the terraform directory as there are templated hcl configurations
## that do not successfully compile without rendering
Expand All @@ -224,11 +219,6 @@ tidy:
@echo "--> Tidy nomad module"
@go mod tidy

.PHONY: sync
sync: tidy
@echo "--> Sync vendor directory"
@go mod vendor

.PHONY: dev
dev: GOOS=$(shell go env GOOS)
dev: GOARCH=$(shell go env GOARCH)
Expand Down
Loading

0 comments on commit 7c962b5

Please sign in to comment.