Skip to content

Instantly share code, notes, and snippets.

@kovshenin
Last active February 12, 2017 23:45
Show Gist options
  • Save kovshenin/f8e4ddd5bf9ec377d0de to your computer and use it in GitHub Desktop.
Save kovshenin/f8e4ddd5bf9ec377d0de to your computer and use it in GitHub Desktop.
camptix-release.sh
#!/bin/bash
tag=${1:-trunk}
echo "Releasing CampTix Version: $tag"
d=`mktemp -d -t camptix`
git clone [email protected]:Automattic/camptix.git $d/git
svn co https://plugins.svn.wordpress.org/camptix/trunk $d/svn
cp -r $d/git/* $d/svn/
cd $d/svn
svn add .
svn commit -m "Sync with GitHub master."
if [ $? -ne 0 ] && [ $tag -ne "trunk" ]; then
svn cp ^/camptix/trunk ^/camptix/tags/$tag -m "Release $tag"
else
echo "Nothing to commit. Baliing."
fi
rm -rf $d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment