Skip to content

Instantly share code, notes, and snippets.

@rlee287
Last active March 17, 2018 04:56
Show Gist options
  • Save rlee287/263c75a4967a9d8c36f3fb45f6e79b89 to your computer and use it in GitHub Desktop.
Save rlee287/263c75a4967a9d8c36f3fb45f6e79b89 to your computer and use it in GitHub Desktop.
FRC Tag Deploy Script
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 <name of tag>"
exit
fi
git add --all
git diff --staged --quiet
hasdiff=$?
if [ $hasdiff -eq 0 ]; then
echo "No changes exist on the index"
#exit
else
git commit -m "Tag WPILib deploying on $(date)"
fi
git tag $1
if hash ant; then
ant
else
echo "Commit tagged and code ready to deploy from Eclipse"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment