From ed783edfd8039672da0752471ae59e76618050dc Mon Sep 17 00:00:00 2001 From: Jabran Rafique Date: Wed, 25 Mar 2020 00:04:03 +0000 Subject: [PATCH] add release script --- release.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 release.sh diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..863fe72 --- /dev/null +++ b/release.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +if [ -z "$1" ] + then + echo "- No version is given. Use as ./release.sh 1.0.0"; + exit 1 +fi + +echo "- Clean up SVN"; +rm -rf svn + +echo "- Checkout from SVN remote"; +svn co http://plugins.svn.wordpress.org/wp-acf-nullify-gatsby/ svn + +echo "- Clean up SVN trunk"; +rm -rf svn/trunk/* + +echo "- Copy latest code to SVN trunk"; +cp -r src/* svn/trunk/ +svn add svn/trunk/* + +echo "- Create new SVN tag"; +svn cp svn/trunk "svn/tags/$1" + +echo "- Release to SVN remote"; +cd svn/ +svn ci -m "Release version $1" --username jabranr