Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
🔧 chore: auto get version to match poetry based projects
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Jul 28, 2024
1 parent a373b13 commit 7bd47ab
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/api-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Initialize venv and install packages
run: |
pipx install uv
just setup
just install
source .venv/bin/activate
- name: Test bilili API
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Initialize venv and install packages
run: |
pipx install uv
just setup
just install
source .venv/bin/activate
- name: e2e without subprocess
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Initialize venv and install packages
run: |
pipx install uv
just setup
just install
source .venv/bin/activate
- name: lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: build release distributions
run: |
pipx install uv
just setup
just install
source .venv/bin/activate
just build
Expand Down
10 changes: 5 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
set positional-arguments

PYTHON := ".venv/bin/python"
VERSION := `uv run python -c "import sys; from bilili.__version__ import VERSION as bilili_version; sys.stdout.write(bilili_version)"`

setup:
install:
uv sync

clean-venv:
Expand All @@ -18,9 +18,9 @@ test:
build:
uv tool run --from build python -m build --installer uv .

release version:
@echo 'Tagging {{version}}...'
git tag {{version}}
release:
@echo 'Tagging {{VERSION}}...'
git tag {{VERSION}}
@echo 'Push to GitHub to trigger publish process...'
git push --tags

Expand Down

0 comments on commit 7bd47ab

Please sign in to comment.