makerelease.sh 674 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. srcdir="$(realpath -e "$0" | xargs dirname)"
  3. srcdir="$srcdir/.."
  4. die() { echo "$*"; exit 1; }
  5. # Import the makerelease.lib
  6. # https://bues.ch/cgit/misc.git/tree/makerelease.lib
  7. for path in $(echo "$PATH" | tr ':' ' '); do
  8. [ -f "$MAKERELEASE_LIB" ] && break
  9. MAKERELEASE_LIB="$path/makerelease.lib"
  10. done
  11. [ -f "$MAKERELEASE_LIB" ] && . "$MAKERELEASE_LIB" || die "makerelease.lib not found."
  12. hook_get_version()
  13. {
  14. version="$(grep 'version=' "$srcdir/setup.py" | head -n1 | cut -d'"' -f2)"
  15. }
  16. hook_regression_tests()
  17. {
  18. default_hook_regression_tests "$@"
  19. # Run selftests
  20. sh "$1/tests/run.sh"
  21. }
  22. project=bme280-upy
  23. default_archives=py-sdist-xz
  24. makerelease "$@"