Mercurial > code > home > repos > rdferry
comparison precommit.sh @ 0:fa108e01b284
start
author | drewp@bigasterisk.com |
---|---|
date | Fri, 15 Mar 2024 18:37:20 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:fa108e01b284 |
---|---|
1 #!/bin/bash | |
2 exit 0 | |
3 | |
4 # Define your project's root directory | |
5 PROJECT_ROOT="/path/to/your/project" | |
6 | |
7 # Change directory to the project root | |
8 cd "$PROJECT_ROOT" || exit | |
9 | |
10 # Install dependencies using pdm | |
11 pdm install | |
12 | |
13 # Check if the installation was successful | |
14 if [ $? -ne 0 ]; then | |
15 echo "Error: Failed to install dependencies with pdm." | |
16 exit 1 | |
17 fi | |
18 | |
19 # Run your code | |
20 # Modify the command as per your project structure and requirements | |
21 python your_script.py | |
22 | |
23 # Check if the execution was successful | |
24 if [ $? -ne 0 ]; then | |
25 echo "Error: Failed to run your code." | |
26 exit 1 | |
27 fi | |
28 | |
29 # If everything is successful, exit with 0 status | |
30 exit 0 |