diff --git a/.github/hooks/include_webapp_in_requirements.sh b/.github/hooks/include_webapp_in_requirements.sh index 0d6c5ba..c1e824a 100755 --- a/.github/hooks/include_webapp_in_requirements.sh +++ b/.github/hooks/include_webapp_in_requirements.sh @@ -1,15 +1,16 @@ #!/bin/sh REQUIREMENTS_FILE="requirements.txt" -DOT="." +VERSION=$(poetry version --short) +TAR_FILE="dist/statement_sensei-$VERSION.tar.gz" poetry export -f requirements.txt --output requirements.txt --extras ocrmypdf --without dev if [ -f "$REQUIREMENTS_FILE" ]; then FIRST_LINE=$(head -n 1 "$REQUIREMENTS_FILE") - if [ "$FIRST_LINE" != "$DOT" ]; then - echo "Adding '.' to the top of $REQUIREMENTS_FILE" - (echo "$DOT" && cat "$REQUIREMENTS_FILE") > "$REQUIREMENTS_FILE.tmp" + if [ "$FIRST_LINE" != "$TAR_FILE" ]; then + echo "Adding $TAR_FILE to the top of $REQUIREMENTS_FILE" + (echo "$TAR_FILE" && cat "$REQUIREMENTS_FILE") > "$REQUIREMENTS_FILE.tmp" mv "$REQUIREMENTS_FILE.tmp" "$REQUIREMENTS_FILE" fi else diff --git a/.gitignore b/.gitignore index 9736068..b5abf3d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ _ignore* build -dist +dist/entrypoint +*.whl diff --git a/dist/statement_sensei-0.7.3.tar.gz b/dist/statement_sensei-0.7.3.tar.gz new file mode 100644 index 0000000..fb1541e Binary files /dev/null and b/dist/statement_sensei-0.7.3.tar.gz differ diff --git a/release.sh b/release.sh index 4b4ed45..b760344 100644 --- a/release.sh +++ b/release.sh @@ -15,6 +15,9 @@ msg="# managed by release.sh" # update the pyproject version poetry version $new_version +# build the latest version +poetry build + # update the tauri.conf.json version jq --arg new_version "$new_version" '.version = $new_version' tauri/src-tauri/tauri.conf.json > temp.json && mv temp.json tauri/src-tauri/tauri.conf.json diff --git a/requirements.txt b/requirements.txt index a6ad4db..7a82fc5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -. +dist/statement_sensei-0.7.3.tar.gz altair==5.4.1 ; python_version >= "3.10" and python_version < "3.13" \ --hash=sha256:0ce8c2e66546cb327e5f2d7572ec0e7c6feece816203215613962f0ec1d76a82 \ --hash=sha256:0fb130b8297a569d08991fb6fe763582e7569f8a04643bbd9212436e3be04aef