Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use git archive to copy beats on community beats #13193

Merged
merged 5 commits into from
Aug 12, 2019
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-developer.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ The list below covers the major changes between 7.0.0-rc2 and master only.
- Introduce beat.OutputChooses publisher mode. {pull}12996[12996]
- Ensure that beat.Processor, beat.ProcessorList, and processors.ProcessorList are compatible and can be composed more easily. {pull}12996[12996]
- Add support to close beat.Client via beat.CloseRef (a subset of context.Context). {pull}13031[13031]
- Makefile included in generator copies files from beats repository using `git archive` instead of cp. {pull}13193[13193]
7 changes: 3 additions & 4 deletions generator/beat/{beat}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ pre-setup: copy-vendor git-init
# Copy beats into vendor directory
.PHONY: copy-vendor
copy-vendor:
mkdir -p vendor/github.com/elastic
cp -R ${BEAT_GOPATH}/src/github.com/elastic/beats vendor/github.com/elastic/
rm -rf vendor/github.com/elastic/beats/.git vendor/github.com/elastic/beats/x-pack
mkdir -p vendor/github.com/elastic/beats
git archive --remote ${BEAT_GOPATH}/src/github.com/elastic/beats HEAD | tar -x --exclude=x-pack -C vendor/github.com/elastic/beats
mkdir -p vendor/github.com/magefile
cp -R ${BEAT_GOPATH}/src/github.com/elastic/beats/vendor/github.com/magefile/mage vendor/github.com/magefile
cp -R vendor/github.com/elastic/beats/vendor/github.com/magefile/mage vendor/github.com/magefile

.PHONY: git-init
git-init:
Expand Down
9 changes: 3 additions & 6 deletions generator/common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ test: prepare-test
.PHONY: prepare-test
prepare-test:: python-env
# Makes sure to use current version of beats for testing
mkdir -p ${BUILD_DIR}/src/github.com/elastic/beats/
rsync -a \
--include=vendor/github.com/magefile/mage/build \
--exclude=build/ \
--exclude=.git/ \
${PWD}/../../* ${BUILD_DIR}/src/github.com/elastic/beats/
rm -fr ${BUILD_DIR}/src/github.com/elastic/beats/
git clone -s ${PWD}/../../ ${BUILD_DIR}/src/github.com/elastic/beats/

rm -fr ${BEAT_PATH}
mkdir -p ${BEAT_PATH}
export GOPATH=${PWD}/build ; \
. ${PYTHON_ENV}/bin/activate && \
Expand Down