Mercurial > code > home > repos > rdferry
view precommit.sh @ 3:b5afa9363c3b
add test helper
author | drewp@bigasterisk.com |
---|---|
date | Sat, 16 Mar 2024 11:40:08 -0700 |
parents | fa108e01b284 |
children |
line wrap: on
line source
#!/bin/bash exit 0 # Define your project's root directory PROJECT_ROOT="/path/to/your/project" # Change directory to the project root cd "$PROJECT_ROOT" || exit # Install dependencies using pdm pdm install # Check if the installation was successful if [ $? -ne 0 ]; then echo "Error: Failed to install dependencies with pdm." exit 1 fi # Run your code # Modify the command as per your project structure and requirements python your_script.py # Check if the execution was successful if [ $? -ne 0 ]; then echo "Error: Failed to run your code." exit 1 fi # If everything is successful, exit with 0 status exit 0