sw1tch/canary.sh
2025-04-06 21:05:05 +00:00

16 lines
488 B
Bash
Executable file

#!/bin/bash
# Run the canary script
python3 sw1tch/canary.py
# Check if the canary.txt was generated successfully
if [ $? -eq 0 ] && [ -f sw1tch/data/canary.txt ]; then
# Stage all changes, commit, and push
git add sw1tch/data/canary.txt
git commit -m "Update warrant canary - $(date +%Y-%m-%d)"
git push origin main
echo "Warrant canary updated and pushed to repository."
else
echo "Failed to generate or find canary.txt. Git operations aborted."
exit 1
fi