mirror of https://github.com/zulip/zulip.git
build-release-tarball: Stop using .gitattributes.
Unfortunately, GitHub's web UI for generating release tarballs uses `.gitattributes` to control what files to download, and thus if you downloaded a source tarball for older Zulip versions using the GitHub web UI, you'd be missing important files. We fix this for future releases by moving the blacklist out of .gitattributes. Fixes #129.
This commit is contained in:
parent
e749deb136
commit
bfaf0fb3b2
|
@ -9,17 +9,3 @@
|
|||
*.png binary
|
||||
*.otf binary
|
||||
*.tif binary
|
||||
.gitignore export-ignore
|
||||
.gitattributes export-ignore
|
||||
/static/assets export-ignore
|
||||
/corporate export-ignore
|
||||
/static export-ignore
|
||||
/tools export-ignore
|
||||
/zilencer export-ignore
|
||||
/templates/corporate export-ignore
|
||||
/templates/zilencer export-ignore
|
||||
/puppet/zulip_internal export-ignore
|
||||
/zproject/test_settings.py export-ignore
|
||||
/zerver/fixtures export-ignore
|
||||
/zerver/tests export-ignore
|
||||
/frontend_tests export-ignore
|
||||
|
|
|
@ -41,23 +41,29 @@ if ! git diff --exit-code >/dev/null; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
TMP_CHECKOUT=$TMPDIR/$prefix/
|
||||
TMP_CHECKOUT=$TMPDIR/$prefix
|
||||
TARBALL=$TMPDIR/$prefix.tar
|
||||
BASEDIR=$(pwd)
|
||||
|
||||
# .gitattributes lists the files that are not exported
|
||||
git archive -o "$TARBALL" "--prefix=$prefix/" HEAD
|
||||
|
||||
cd "$TMPDIR"
|
||||
tar -xf "$TARBALL"
|
||||
for i in `cat "$TMP_CHECKOUT"/tools/release-tarball-exclude.txt`; do
|
||||
rm -r --interactive=never "$TMP_CHECKOUT/$i";
|
||||
done
|
||||
tar -cf "$TARBALL" "$prefix"
|
||||
rm -rf "$prefix"
|
||||
|
||||
if tar -tf "$TARBALL" | grep -q -e ^zerver/tests; then
|
||||
echo "Excluded files remain in tarball!";
|
||||
echo "Versions of git 1.8.1.1 - 1.8.1.6 have broken .gitattributes syntax";
|
||||
exit 1;
|
||||
else
|
||||
echo "Check for excluded files passed";
|
||||
echo "BUG: Excluded files remain in tarball!"
|
||||
exit 1
|
||||
fi
|
||||
cd "$BASEDIR"
|
||||
|
||||
# Check out a temporary full copy of the index to generate static files
|
||||
git checkout-index -f -a --prefix "$TMP_CHECKOUT"
|
||||
git checkout-index -f -a --prefix "$TMP_CHECKOUT/"
|
||||
cd "$TMP_CHECKOUT"
|
||||
|
||||
# create var/log directory in the new temporary checkout
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
.gitignore
|
||||
.gitattributes
|
||||
static/assets
|
||||
corporate/
|
||||
static/
|
||||
tools/
|
||||
zilencer/
|
||||
templates/corporate
|
||||
templates/zilencer
|
||||
puppet/zulip_ops
|
||||
zproject/dev_settings.py
|
||||
zproject/test_settings.py
|
||||
zerver/fixtures
|
||||
zerver/tests
|
||||
frontend_tests
|
Loading…
Reference in New Issue