Browse Source

Fix release script brokenness.

Dan Helfman 6 days ago
parent
commit
8134bdec7f
2 changed files with 3 additions and 2 deletions
  1. 1 0
      scripts/export-docs-from-image
  2. 2 2
      scripts/release

+ 1 - 0
scripts/export-docs-from-image

@@ -17,4 +17,5 @@ rm borgmatic-docs-dump.tar
 mv html borgmatic-docs
 mv html borgmatic-docs
 rm -f dist/borgmatic-docs.tar.gz
 rm -f dist/borgmatic-docs.tar.gz
 tar cfz dist/borgmatic-docs.tar.gz borgmatic-docs
 tar cfz dist/borgmatic-docs.tar.gz borgmatic-docs
+rm -fr borgmatic-docs
 podman rm --volumes "$docs_container_id"
 podman rm --volumes "$docs_container_id"

+ 2 - 2
scripts/release

@@ -34,7 +34,7 @@ git push github $version
 # Build borgmatic and publish to pypi.
 # Build borgmatic and publish to pypi.
 rm -fr dist
 rm -fr dist
 uv build
 uv build
-tarball_path=$(ls dist/borgmatic-*.tar.gz)
+tarball_path="dist/borgmatic-$version.tar.gz"
 wheel_path=$(ls dist/borgmatic-*-py3-none-any.whl)
 wheel_path=$(ls dist/borgmatic-*-py3-none-any.whl)
 twine upload -r pypi --username __token__ "$tarball_path"
 twine upload -r pypi --username __token__ "$tarball_path"
 twine upload -r pypi --username __token__ "$wheel_path"
 twine upload -r pypi --username __token__ "$wheel_path"
@@ -51,7 +51,7 @@ release_id=$(curl --silent --request POST \
     --header "Authorization: token $projects_token" \
     --header "Authorization: token $projects_token" \
     --header "Accept: application/json" \
     --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --header "Content-Type: application/json" \
-    --data "{\"body\": \"$escaped_release_changelog\", \"draft\": false, \"name\": \"borgmatic $version\", \"prerelease\": false, \"tag_name\": \"$version\"}"
+    --data "{\"body\": \"$escaped_release_changelog\", \"draft\": false, \"name\": \"borgmatic $version\", \"prerelease\": false, \"tag_name\": \"$version\"}" \
     | jq ".id")
     | jq ".id")
 curl --silent --request POST \
 curl --silent --request POST \
     "https://projects.torsion.org/api/v1/repos/borgmatic-collective/borgmatic/releases/$release_id/assets?name=$(basename $wheel_path)" \
     "https://projects.torsion.org/api/v1/repos/borgmatic-collective/borgmatic/releases/$release_id/assets?name=$(basename $wheel_path)" \