Merge pull request #1811 from xfxyjwf/fixdist

Add missing files in EXTRA_DIST and add a test.
pull/1815/head
Feng Xiao 8 years ago committed by GitHub
commit 30d8416c1c
  1. 1
      Makefile.am
  2. 25
      tests.sh

@ -782,6 +782,7 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \
editors/README.txt \ editors/README.txt \
editors/proto.vim \ editors/proto.vim \
editors/protobuf-mode.el \ editors/protobuf-mode.el \
examples/CMakeLists.txt \
examples/README.txt \ examples/README.txt \
examples/Makefile \ examples/Makefile \
examples/addressbook.proto \ examples/addressbook.proto \

@ -44,6 +44,30 @@ build_cpp() {
build_cpp_distcheck() { build_cpp_distcheck() {
./autogen.sh ./autogen.sh
./configure ./configure
make dist
# List all files that should be included in the distribution package.
git ls-files | grep "^\(java\|python\|objectivec\|csharp\|js\|ruby\|cmake\|examples\)" |\
grep -v ".gitignore" | grep -v "java/compatibility_tests" > dist.lst
# 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=""
for FILE in $(<../dist.lst); do
if ! file $FILE &>/dev/null; then
echo "$FILE is not found!"
FILES_MISSING="$FILE $FILES_MISSING"
fi
done
cd ..
if [ ! -z "$FILES_MISSING" ]; then
echo "Missing files in EXTRA_DIST: $FILES_MISSING"
exit 1
fi
# Do the regular dist-check for C++.
make distcheck -j2 make distcheck -j2
} }
@ -320,6 +344,7 @@ build_javascript() {
if [ "$#" -ne 1 ]; then if [ "$#" -ne 1 ]; then
echo " echo "
Usage: $0 { cpp | Usage: $0 { cpp |
cpp_distcheck |
csharp | csharp |
java_jdk6 | java_jdk6 |
java_jdk7 | java_jdk7 |

Loading…
Cancel
Save