.github/update-versions
#!/bin/bash
read -r version
IFS='.' read -ra versionParts <<< "$version"
majorMinorVersion="${versionParts[0]}.${versionParts[1]}"
sed -e "s!# Laravel-Piwik v.*\$!# Laravel-Piwik v$version!" -e "s!\"robbrazier/piwik\": \"~.*\"!\"robbrazier/piwik\": \"~$majorMinorVersion\"!" -i README.md
sed -e "s!\"version\": \".*\",\$!\"version\": \"$version\",!" -i composer.json
sed -e "s!composer require \"robbrazier/piwik=~.*\"!composer require \"robbrazier/piwik=~$majorMinorVersion\"!" -i docs/installation/laravel-5+.md
echo "Updated to $version"