Last active
October 21, 2024 18:15
-
-
Save desrosj/fc6c84d45ca4df5dc1cd03cad84254bb to your computer and use it in GitHub Desktop.
Manages SVN checkouts for branches of wordpress-develop locally.
This file contains hidden or 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/zsh | |
clean_update_local_branch() { | |
svn info | |
svn revert -R . | |
svn up | |
svn info | |
} | |
clean_up_npm() { | |
echo "Removing node_modules folder..." | |
rm -rf node_modules | |
nvm install | |
npm install | |
npm run | |
npm run build:dev --if-present | |
npm run build | |
} | |
cd ~/Sites/wordpress-svn/trunk | |
clean_update_local_branch | |
clean_up_npm | |
versions=("6.7" "6.6" "6.5" "6.4" "6.3" "6.2" "6.1" "6.0" "5.9" "5.8" "5.7" "5.6" "5.5" "5.4" "5.3" "5.2" "5.1" "5.0" "4.9" "4.8" "4.7" "4.6" "4.5" "4.4" "4.3" "4.2" "4.1" "4.0" "3.9" "3.8" "3.7" "3.6" ) | |
version_names=("six-seven" "six-six" "six-five" "six-four" "six-three" "six-two" "six-one" "six-oh" "five-nine" "five-eight" "five-seven" "five-six" "five-five" "five-four" "five-three" "five-two" "five-one" "five-oh" "four-nine" "four-eight" "four-seven" "four-six" "four-five" "four-four" "four-three" "four-two" "four-one" "four-oh" "three-nine" "three-eight" "three-seven" "three-six" ) | |
for x in "${versions[@]}" | |
do | |
cd ../${version_names[$x]} | |
ls | |
pwd | |
clean_update_local_branch | |
svn switch "^/branches/${versions[$x]}" --accept tf | |
svn revert -R . | |
svn up | |
done | |
for x in "${versions[@]}" | |
do | |
cd ../${version_names[$x]} | |
ls | |
pwd | |
clean_up_npm | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment