Skip to content

Commit

Permalink
Ensure that release archives contain everything needed for Bazel
Browse files Browse the repository at this point in the history
This change adds some files to EXTRA_DIST in Makefile.am so that our
published tar and zip files will have everything needed for Bazel
builds. I also added a basic test for this so that next time we should
find out sooner if we're missing any important files.

This should fix #9129.
  • Loading branch information
acozzette committed Oct 20, 2021
1 parent 17b30e9 commit 9456bc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile.am
Expand Up @@ -1424,8 +1424,10 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \
examples/list_people.py \
examples/list_people_test.go \
examples/pubspec.yaml \
maven_install.json \
protobuf.bzl \
protobuf_deps.bzl \
protobuf_version.bzl \
third_party/zlib.BUILD \
util/python/BUILD \
internal.bzl
Expand Down
10 changes: 9 additions & 1 deletion kokoro/linux/bazel/build.sh
Expand Up @@ -35,5 +35,13 @@ bazel test -k --copt=-Werror --host_copt=-Werror \
@com_google_protobuf//:cc_proto_blacklist_test
trap - EXIT

cd examples
pushd examples
bazel build //...
popd

# Verify that we can build successfully from generated tar files.
./autogen.sh && ./configure && make -j$(nproc) dist
DIST=`ls *.tar.gz`
tar -xf $DIST
cd ${DIST//.tar.gz}
bazel build //:protobuf //:protobuf_java

0 comments on commit 9456bc5

Please sign in to comment.