Last active
February 3, 2017 17:01
Star
You must be signed in to star a gist
Show all theme releases from the last month. The script should be placed in wp-content/themes/ and your themes should have .git/ in root.
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
#!/bin/bash | |
# | |
# Gist: https://gist.github.com/primozcigler/e816919feea345ca393dc4ae90a872fd | |
# How to use it: https://primoz.blog/simple-bash-script-can-tell-releases-given-date-period/ | |
if [[ $# -ne 2 ]]; then | |
echo "usage: $0 <start date> <end date>" | |
echo "<date> in format 'YYYY-MM-DD'" | |
exit | |
fi | |
for theme_path in $(find . -maxdepth 1 -mindepth 1 -type d); do | |
cd $theme_path | |
if [[ -d .git ]]; then | |
git pull -q | |
releases=$(git log --tags --after="$1" --before="$2" --simplify-by-decoration --pretty="format:%ci %d") | |
if [[ $releases ]]; then | |
echo "Releases for ${theme_path}:" | |
echo "${releases}" | |
echo | |
fi | |
fi | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment