Skip to content

Commit

Permalink
Update docs on how to use govendor (#3876)
Browse files Browse the repository at this point in the history
Remove usage of glide.
  • Loading branch information
ruflin authored and monicasarbu committed Apr 10, 2017
1 parent 5daa46b commit 81783d4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 129 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

# Files
.DS_Store
/glide.lock
/beats.iml
*.dev.yml
*.generated.yml
Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ inside the folder for the Beat. This will automatically open your browser with t
## Dependencies

To manage the `vendor/` folder we use
[glide](https://github.com/Masterminds/glide), which uses
[glide.yaml](glide.yaml) as a manifest file for the dependencies. Please see
the glide documentation on how to add or update vendored dependencies.
[govendor](https://github.com/kardianos/govendor). Please see
the govendor documentation on how to add or update vendored dependencies.

In most cases `govendor fetch your/dependency@version +out` will get the job done.

2 changes: 1 addition & 1 deletion generator/beat/{beat}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BEAT_URL=https://${BEAT_PATH}
SYSTEM_TESTS=false
TEST_ENVIRONMENT=false
ES_BEATS?=./vendor/github.com/elastic/beats
GOPACKAGES=$(shell glide novendor)
GOPACKAGES=$(shell govendor list +local)
PREFIX?=.
NOTICE_FILE=NOTICE

Expand Down
6 changes: 1 addition & 5 deletions generator/metricbeat/{beat}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BEAT_URL=https://${BEAT_PATH}
SYSTEM_TESTS=false
TEST_ENVIRONMENT=false
ES_BEATS?=./vendor/github.com/elastic/beats
GOPACKAGES=$(shell glide novendor)
GOPACKAGES=$(shell govendor list +local)
PREFIX?=.
NOTICE_FILE=NOTICE

Expand All @@ -24,10 +24,6 @@ copy-vendor:
cp -R ${GOPATH}/src/github.com/elastic/beats vendor/github.com/elastic/
rm -rf vendor/github.com/elastic/beats/.git

.PHONY: update-deps
update-deps:
glide update --no-recursive --strip-vcs

# This is called by the beats packer before building starts
.PHONY: before-build
before-build:
6 changes: 3 additions & 3 deletions generator/metricbeat/{beat}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ This updates all fields and docs with the most recent changes.

## Use vendoring

We recommend to use vendoring for your beat. This means the dependencies are put into your beat folder. The beats team currently uses [glide](https://github.com/Masterminds/glide) for vendoring.
We recommend to use vendoring for your beat. This means the dependencies are put into your beat folder. The beats team currently uses [govendor](https://github.com/kardianos/govendor) for vendoring.

```
glide init
glide update --quick
govendor init
govendor update +e
```

This will create a directory `vendor` inside your repository. To make sure all dependencies for the Makefile commands are loaded from the vendor directory, find the following line in your Makefile:
Expand Down
115 changes: 0 additions & 115 deletions glide.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion libbeat/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BEAT_LICENSE?=ASL 2.0 ## @packaging Software license of the application
BEAT_VENDOR?=Elastic ## @packaging Name of the vendor of the application
BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH}))
ES_BEATS?=..## @community_beat Must be set to ./vendor/github.com/elastic/beats. It must always be a relative path.
GOPACKAGES?=${BEAT_PATH}/...## @community_beat Must be set to $(shell glide novendor)
GOPACKAGES?=${BEAT_PATH}/...## @community_beat Must be set to $(shell govendor list +local)
PACKER_TEMPLATES_DIR?=${ES_BEATS}/dev-tools/packer ## @Building Directory of templates that are used by "make package"
NOTICE_FILE?=../NOTICE

Expand Down

0 comments on commit 81783d4

Please sign in to comment.