Last active
February 12, 2017 23:45
-
-
Save kovshenin/f8e4ddd5bf9ec377d0de to your computer and use it in GitHub Desktop.
camptix-release.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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