Skip to content

Commit

Permalink
build: adds a build-release command to build the sql and update the _…
Browse files Browse the repository at this point in the history
…_version__ in __init__.py
  • Loading branch information
jgpruitt committed Jan 16, 2025
1 parent aafe12c commit baf12ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions projects/extension/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- clean removes python build artifacts from the src dir
- clean-sql removes sql file artifacts from the sql dir
- clean-py removes python build artifacts from the extension src dir
- build-release runs build-sql and updates the version in __init__.py
- test runs the tests in the docker container
- test-server runs the test http server in the docker container
- lint-sql runs pgspot against the `ai--<this_version>.sql` file
Expand Down Expand Up @@ -626,6 +627,13 @@ def clean() -> None:
clean_py()


def build_release() -> None:
clean_sql()
clean_py()
build()
build_init_py()


def tests_dir() -> Path:
return ext_dir().joinpath("tests").absolute()

Expand Down Expand Up @@ -777,6 +785,8 @@ def run() -> None:
clean_py()
elif action == "clean":
clean()
elif action == "build-release":
build_release()
elif action == "uninstall-py":
uninstall_py()
elif action == "uninstall-sql":
Expand Down
3 changes: 3 additions & 0 deletions projects/extension/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ freeze:
build-sql:
@./build.py build-sql

build-release:
@./build.py build-release

test-server:
@./build.py test-server

Expand Down

0 comments on commit baf12ff

Please sign in to comment.