view precommit.sh @ 1:db1ee14b922d

a little more to get presubmit working
author drewp@bigasterisk.com
date Fri, 15 Mar 2024 23:24:59 -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