Skip to content

Instantly share code, notes, and snippets.

@nzambello
Created March 24, 2020 08:59
Show Gist options
  • Save nzambello/704039c6a43b78808a2a99ef01d97d5e to your computer and use it in GitHub Desktop.
Save nzambello/704039c6a43b78808a2a99ef01d97d5e to your computer and use it in GitHub Desktop.
Script to check in src/ Plone packages to be released
#!/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