Last active
January 17, 2023 08:16
-
-
Save ErikSchierboom/006f5d25ee1a0b86be449103c5177bb5 to your computer and use it in GitHub Desktop.
Script to submit exercism exercise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
exercise=$(echo $PWD | awk -F/ '{print $(NF)}') | |
track=$(echo $PWD | awk -F/ '{print $(NF-1)}') | |
if [[ $(git ls-files --error-unmatch README.md 2> /dev/null) ]]; then | |
type="iteration" | |
else | |
type="solution" | |
fi | |
exercism submit | |
git add . | |
git commit -m "${track}/${exercise}: add ${type}" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment