Created
March 24, 2020 08:59
-
-
Save nzambello/704039c6a43b78808a2a99ef01d97d5e to your computer and use it in GitHub Desktop.
Script to check in src/ Plone packages to be released
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 | |
RED='\033[1;31m' | |
RESET='\033[0m' | |
echo -e "\nThese repos have not released changes:\n" | |
for dir in $(ls -Ad */); | |
do | |
cd "$dir" || exit | |
if [ -f "CHANGES.rst" ]; | |
then | |
file='CHANGES.rst' | |
elif [ -f "docs/HISTORY.txt" ] | |
then | |
file='docs/HISTORY.txt' | |
else | |
file='' | |
fi | |
if [[ -n $file ]]; | |
then | |
haschanges=$( grep -C 3 "Nothing changed yet" "$file" | grep "unreleased" -c ) | |
if [[ $haschanges -eq 0 ]]; | |
then | |
echo -e "> ${RED}${dir}${RESET}" | |
fi | |
fi | |
cd .. | |
done | |
echo "" | |
exit 0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment