poetry_build.sh 442 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. set -ex
  3. rm -rf build
  4. mkdir build
  5. mkdir -p dist
  6. (cd "$(git rev-parse --show-toplevel)"; git archive HEAD) > build/tmp.tar
  7. cd build
  8. ln -s ../dist .
  9. mkdir nanopb
  10. tar xf tmp.tar README.md generator
  11. mv generator nanopb/
  12. touch nanopb/__init__.py nanopb/generator/__init__.py
  13. make -C nanopb/generator/proto
  14. cp ../pyproject.toml .
  15. sed -i -e 's/\(version =.*\)-dev.*/\1-dev'$(git rev-list HEAD --count)'"/' pyproject.toml
  16. poetry build