Skip to content

Commit

Permalink
chore: add just command for releasing goose
Browse files Browse the repository at this point in the history
  • Loading branch information
zakiali committed Sep 20, 2024
1 parent d4b27d0 commit fcf5957
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This is the default recipe when no arguments are provided
[private]
current_version := `grep 'version' pyproject.toml | cut -d '"' -f 2`
tag_name := "v" + current_version

default:
@just --list --unsorted

Expand All @@ -17,3 +20,23 @@ coverage *FLAGS:
uv run coverage run -m pytest tests -m "not integration" {{FLAGS}}
uv run coverage report
uv run coverage lcov -o lcov.info

ai-exchange-version:
curl -s https://pypi.org/pypi/ai-exchange/json | jq -r .info.version

# bump project version, push, create pr
release version:
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version {{version}}
ai_exchange_version=$(just ai-exchange-version) && sed -i '' 's/ai-exchange>=.*/ai-exchange>='"${ai_exchange_version}"'\",/' pyproject.toml
git checkout -b release-version-{{version}}
git add pyproject.toml
git commit -m "chore(release): release version {{version}}"

tag:
git tag {{tag_name}}

# this will kick of ci for release
# use this when release branch is merged to main
tag-push:
just tag
git push origin tag {{tag_name}}

0 comments on commit fcf5957

Please sign in to comment.