first commit

This commit is contained in:
ct
2025-05-28 12:59:01 +08:00
commit 21526508b1
230 changed files with 60411 additions and 0 deletions

37
trifecta.sh Normal file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
run_script() {
echo "Executing $1..."
if sh "$1" "${@:2}"; then
echo "$1 completed successfully."
else
echo "$1 failed. Stopping execution."
exit 1
fi
}
# Check if branch parameter is provided
if [ $# -eq 0 ]; then
echo "Error: Branch parameter is missing."
echo "Usage: sh trifecta.sh <branch>"
echo "Where <branch> is either 'main' or 'staging' or 'main_webqueue' (NO GPU) of 'sandbox'."
exit 1
fi
branch=$1
# Validate the provided branch name
if [ "$branch" != "main" ]; then
echo "Error: Invalid branch name. Please use 'main'"
exit 1
fi
echo "Starting trifecta.sh for branch: $branch"
if [ "$branch" == "main" ]; then
run_script prod.sh
run_script push.sh main
run_script deploy.sh all
fi
echo "All scripts executed successfully. trifecta.sh completed."