Skip to content

Instantly share code, notes, and snippets.

@rolandinsh
Last active March 3, 2017 07:49
Show Gist options
  • Save rolandinsh/f0f490836cc54c175644b1d8aca38537 to your computer and use it in GitHub Desktop.
Save rolandinsh/f0f490836cc54c175644b1d8aca38537 to your computer and use it in GitHub Desktop.
Update WP.ORG SVN from GitHub's latest release
#!/bin/sh
# The script updates the Wordpress.org SVN repository after pushing
# the latest release from Github
BASE_DIR=`pwd`
TMP_DIR=$BASE_DIR/tmp
mkdir $TMP_DIR
svn co http://plugins.svn.wordpress.org/xxxxxxxx/ $TMP_DIR
cd $TMP_DIR/trunk
git clone --recursive https://github.com/yyyyyyyy/xxxxxxxxx.git tmp
cp -r tmp/* .
rm -rf tmp
rm -rf .git*
version=`head -n 1 VERSION`
cd $TMP_DIR
svn add trunk/* --force
svn ci -m "Release $version"
svn cp trunk tags/$version
svn ci -m "Tagging version $version"
rm -rf $TMP_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment