Skip to content

Instantly share code, notes, and snippets.

@sebacipolat
Last active December 13, 2021 03:28
Show Gist options
  • Save sebacipolat/acce47a1eda87452f72c973d86b3235b to your computer and use it in GitHub Desktop.
Save sebacipolat/acce47a1eda87452f72c973d86b3235b to your computer and use it in GitHub Desktop.
script
git clone git@gitlab.com:nx/app/version-modules.git
cd 'version-modules'
search="**$MODULE**"
if grep -i "$search" "./readme.md" ; then
sed -i "/$MODULE/c\| **$MODULE** | ![GitHub version](https://img.shields.io/badge/version-$VERSION-brightgreen) |" ./readme.md
else
newline="| **$MODULE** | ![GitHub version](https://img.shields.io/badge/version-$VERSION-brightgreen) |"
echo $newline >> ./readme.md
fi
git add README.md
git commit -m "update module"
git push -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment