Skip to content

Instantly share code, notes, and snippets.

@desrosj
Created October 21, 2024 18:20
Show Gist options
  • Save desrosj/c474df40ee4c61b4b9d2446f3eaba04d to your computer and use it in GitHub Desktop.
Save desrosj/c474df40ee4c61b4b9d2446f3eaba04d to your computer and use it in GitHub Desktop.
Sync a wordpress-develop fork by pulling in upstream changes.
#!/bin/zsh
cd ~/Sites/wordpress-develop
nvm install
git reset --hard
git fetch --all
npm run grunt clean -- --dev
rm -rf node_modules
versions=("trunk" "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" )
for x in ${!versions[*]}
do
git checkout ${versions[$x]}
git pull upstream ${versions[$x]}
done
git checkout trunk
npm install && npm run build:dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment