Skip to content

Commit

Permalink
add: tools for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Huffman committed Dec 22, 2023
1 parent 3c79c4f commit 6e4943a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bin/build.sh
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
13 changes: 13 additions & 0 deletions bin/publish-pypi.sh
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
10 changes: 10 additions & 0 deletions bin/run_tests.sh
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

0 comments on commit 6e4943a

Please sign in to comment.