Tabs to spaces.

pull/7/head
Ferry Boender 5 years ago
parent f9004e890b
commit 0bbf7451c7
  1. 66
      build.sla

@ -11,31 +11,31 @@ PROG="scriptform"
test () { test () {
# Run tests # Run tests
ROOTDIR="$(pwd)" ROOTDIR="$(pwd)"
cd test && python ./test.py cd test && python ./test.py
cd $ROOTDIR cd $ROOTDIR
cd src && flake8 *.py || true cd src && flake8 *.py || true
cd $ROOTDIR cd $ROOTDIR
cd src && pylint --reports=n -dR -d star-args -d no-member *.py || true cd src && pylint --reports=n -dR -d star-args -d no-member *.py || true
cd $ROOTDIR cd $ROOTDIR
} }
clean () { clean () {
# Clean the repo of artifacts # Clean the repo of artifacts
rm -rf $PROG.spec rm -rf $PROG.spec
rm -rf *.tar.gz rm -rf *.tar.gz
rm -rf *.zip rm -rf *.zip
rm -rf *.deb rm -rf *.deb
rm -rf rel_deb rm -rf rel_deb
rm -rf scriptform-* rm -rf scriptform-*
rm -rf doc/manual.html rm -rf doc/manual.html
rm -rf doc/MANUAL.html rm -rf doc/MANUAL.html
rm -rf examples/megacorp_acc/megacorp.db rm -rf examples/megacorp_acc/megacorp.db
rm -rf examples/megacorp_acc/.coverage rm -rf examples/megacorp_acc/.coverage
rm -rf examples/megacorp_acc/htmlcov rm -rf examples/megacorp_acc/htmlcov
find ./ -name "*.log" -delete find ./ -name "*.log" -delete
find ./ -name "*.pyc" -delete find ./ -name "*.pyc" -delete
rm -f test/data.csv rm -f test/data.csv
rm -f test/data.raw rm -f test/data.raw
rm -rf dist/ rm -rf dist/
rm -rf build rm -rf build
} }
@ -78,22 +78,22 @@ release_src () {
# Build source (tar.gz) release # Build source (tar.gz) release
_release_check "$*" _release_check "$*"
# Prepare source # Prepare source
rm -rf "$PROG-$REL_VERSION" rm -rf "$PROG-$REL_VERSION"
mkdir "$PROG-$REL_VERSION" mkdir "$PROG-$REL_VERSION"
cp src/*.py "$PROG-$REL_VERSION/" cp src/*.py "$PROG-$REL_VERSION/"
mv "$PROG-$REL_VERSION/scriptform.py" "$PROG-$REL_VERSION/$PROG" mv "$PROG-$REL_VERSION/scriptform.py" "$PROG-$REL_VERSION/$PROG"
cp LICENSE "$PROG-$REL_VERSION/" cp LICENSE "$PROG-$REL_VERSION/"
cp README.md "$PROG-$REL_VERSION/" cp README.md "$PROG-$REL_VERSION/"
cp contrib/release_Makefile "$PROG-$REL_VERSION/Makefile" cp contrib/release_Makefile "$PROG-$REL_VERSION/Makefile"
cp doc/MANUAL.html "$PROG-$REL_VERSION/MANUAL.html" cp doc/MANUAL.html "$PROG-$REL_VERSION/MANUAL.html"
# Bump version numbers # Bump version numbers
find "$PROG-$REL_VERSION/" -type f -print0 | xargs -0 sed -i "s/%%VERSION%%/$REL_VERSION/g" find "$PROG-$REL_VERSION/" -type f -print0 | xargs -0 sed -i "s/%%VERSION%%/$REL_VERSION/g"
# Create archives # Create archives
zip -q -r "$PROG-$REL_VERSION.zip" "$PROG-$REL_VERSION" zip -q -r "$PROG-$REL_VERSION.zip" "$PROG-$REL_VERSION"
tar -czf "$PROG-$REL_VERSION.tar.gz" "$PROG-$REL_VERSION" tar -czf "$PROG-$REL_VERSION.tar.gz" "$PROG-$REL_VERSION"
} }
release_deb () { release_deb () {

Loading…
Cancel
Save