Skip to content

Commit

Permalink
add checks to release script
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzming committed May 30, 2024
1 parent 1e1f2cc commit 5535bbe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ragstack/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,19 @@ This implies that every release of `ragstack-ai-langflow-base` will also need a

## Release `ragstack-ai-langflow`

- Update the `pyproject.toml` file pointing to the correct version of `ragstack-ai-langflow-base`. Run `poetry lock` and open a PR to trigger the tests. Once merged, proceed with the next steps.
- Update the `ragstack-ai-langflow-base` version under the `[ttol.poetry.dependencies]` in the `pyproject.toml` file.
- Run `poetry lock` and open a PR to trigger the tests. Once merged, proceed with the next steps.
- Run the release script:
```shell
./ragstack/ragstack-release.sh 0.0.2 ragstack-ai-langflow
```
The script will take care of updating the version in `ragstack-ai-langflow` and pushing the changes to the repository. CI will automatically release the package on PyPI.

### Error

You can re-run the the release job for this error. It's because the size of the package sometime cannot be uploaded properly.

```
- Uploading ragstack_ai_langflow-0.0.5-py3-none-any.whl 100%
HTTP Error 400: The digest supplied does not match a digest calculated from the uploaded file. | b'<html>\n <head>\n <title>400 The digest supplied does not match a digest calculated from the uploaded file.\n \n <body>\n <h1>400 The digest supplied does not match a digest calculated from the uploaded file.\n The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>\nThe digest supplied does not match a digest calculated from the uploaded file.\n\n\n \n'
```
14 changes: 14 additions & 0 deletions ragstack/ragstack-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,24 @@ if [ -z "$remote_name" ]; then
fi
echo "Identified remote $remote_name"

if git rev-parse $tag >/dev/null 2>&1; then
echo "Git tag $tag already exists"
exit 1
fi

cd $directory
if [ "$package" == "ragstack-ai-langflow" ]; then
base_version=$(poetry show ragstack-ai-langflow-base | grep -E "^ version" | awk '{print $3}')
# for now we only check the exact version match
if [ "$base_version" != "$version" ]; then
echo "Version mismatch: ragstack-ai-langflow-base version $base_version != ragstack-ai-langflow version $version"
exit 1
fi
fi

git checkout ragstack-main
git pull

echo ":: Bumping version to $version for package $package"
poetry version $version
git commit -am "Release $package $version"
Expand Down

0 comments on commit 5535bbe

Please sign in to comment.