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 e2235a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
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
4 changes: 4 additions & 0 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ build_cpp_distcheck() {
# Unzip the dist tar file.
DIST=`ls *.tar.gz`
tar -xf $DIST

cd ${DIST//.tar.gz}
# Check if every file exists in the dist tar file.
FILES_MISSING=""
Expand All @@ -77,7 +78,10 @@ build_cpp_distcheck() {
FILES_MISSING="$FILE $FILES_MISSING"
}
done
# Do a basic check that we can perform Bazel builds.
bazel build //:protobuf //:protobuf_java
cd ..

if [ ! -z "$FILES_MISSING" ]; then
echo "Missing files in EXTRA_DIST: $FILES_MISSING"
exit 1
Expand Down

0 comments on commit e2235a8

Please sign in to comment.