Created
May 10, 2023 10:57
-
-
Save kitzberger/f4922e7c64275129c7f8a78670d37335 to your computer and use it in GitHub Desktop.
Script for bumping versions in TYPO3 projects
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
t3version() { | |
[[ -z "$1" ]] && echo "Specify new version parameter!" && return | |
extEmconf=$(git ls-files *ext_emconf.php) | |
if [ ! -z "$extEmconf" ]; then | |
sed -i "s/'version'\(\s*\)=>\(\s*\)'\(.*\)',/'version'\1=>\2'$1',/" $extEmconf | |
git add $extEmconf | |
echo "Updated version in all ext_emconf.php's" | |
fi | |
packageJson=$(git ls-files *package.json) | |
if [ ! -z "$packageJson" ]; then | |
sed -i "s/\"version\"\(\s*\):\(\s*\)\"\(.*\)\",/\"version\"\1:\2\"$1\",/" $packageJson | |
git add $packageJson | |
echo "Updated version in all package.json's" | |
fi | |
if [[ -f ./VERSION ]]; then | |
echo "$1" > ./VERSION | |
git add ./VERSION | |
echo "Updated version in VERSION" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment