Skip to content
Permalink
Browse files

Only update wp-cli with every wordpress update

  • Loading branch information...
pierres committed Sep 7, 2019
1 parent 7da1f2f commit 135b0dc83136d3f1809435657451058c0170ee61
Showing with 3 additions and 3 deletions.
  1. +3 −3 Makefile
@@ -4,17 +4,17 @@
ci-update-commit:
git config --local user.name "$${GH_NAME}"
git config --local user.email "$${GH_EMAIL}"
curl -so wp-cli https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli
git add -A
git commit -m"Update to WordPress $$(php -r 'require "wp-includes/version.php";echo $$wp_version;')"
git remote add origin-push https://$${GH_USER}:$${GH_TOKEN}@github.com/$${GITHUB_REPOSITORY}.git
git push --set-upstream origin-push master

ci-update:
git ls-files | grep -Ev 'wp-content/object-cache\.php|Makefile|robots\.txt|favicon\.ico|\.git.*' | xargs rm -f
git ls-files | grep -Ev 'wp-content/object-cache\.php|Makefile|robots\.txt|favicon\.ico|\.git.*|wp-cli' | xargs rm -f
find . -type d -empty -delete
curl -s https://wordpress.org/latest.tar.gz | tar -xz --strip-components=1
curl -so wp-cli https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli
git checkout master
if ! git diff-index --quiet HEAD; then ${MAKE} ci-update-commit; fi

0 comments on commit 135b0dc

Please sign in to comment.
You can’t perform that action at this time.