-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lee Huffman
committed
Dec 22, 2023
1 parent
3c79c4f
commit 6e4943a
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Activate virtual environment | ||
source venv/bin/activate | ||
|
||
# Run tests first | ||
venv/bin/python -m pytest tests/ | ||
if [ $? -ne 0 ]; then | ||
echo "Tests failed, aborting build." | ||
exit 1 | ||
fi | ||
|
||
# Build the package | ||
python setup.py sdist bdist_wheel | ||
|
||
# Deactivate the virtual environment | ||
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Activate virtual environment | ||
source venv/bin/activate | ||
|
||
# Optional: Run tests again or build | ||
./build.sh | ||
|
||
# Push to PyPI | ||
twine upload dist/* | ||
|
||
# Deactivate the virtual environment | ||
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Activate virtual environment | ||
source venv/bin/activate | ||
|
||
# Run tests using the Python interpreter from the virtual environment | ||
venv/bin/python -m pytest tests/ | ||
|
||
# Deactivate the virtual environment | ||
deactivate |