Skip to content

Instantly share code, notes, and snippets.

@zkan
Created April 28, 2016 13:21
Show Gist options
  • Save zkan/a9d14534601f3c9c5ff216e919ec8d47 to your computer and use it in GitHub Desktop.
Save zkan/a9d14534601f3c9c5ff216e919ec8d47 to your computer and use it in GitHub Desktop.
#!/bin/sh
# The script updates the Wordpress.org SVN repository after pushing
# the latest release from Github
# Credit: https://guh.me/how-to-publish-a-wordpress-plugin-from-github
# Semantic Versioning: http://semver.org/
BASE_DIR=`pwd`
TMP_DIR=$BASE_DIR/tmp
mkdir $TMP_DIR
svn co http://plugins.svn.wordpress.org/comment-reply-email-notification/ $TMP_DIR
cd $TMP_DIR/trunk
git clone --recursive https://github.com/guhemama/worpdress-comment-reply-email-notification.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