@@ -20,14 +20,6 @@ if [[ -z "$SVN_PASSWORD" ]]; then
2020 exit 1
2121fi
2222
23- # Set variables
24- GENERATE_ZIP=false
25-
26- # Set options based on user input
27- if [ -z " $1 " ]; then
28- GENERATE_ZIP=$1 ;
29- fi
30-
3123# Allow some ENV variables to be customized
3224if [[ -z " $SLUG " ]]; then
3325 SLUG=${GITHUB_REPOSITORY#*/ }
4739echo " ℹ︎ ASSETS_DIR is $ASSETS_DIR "
4840
4941SVN_URL=" https://plugins.svn.wordpress.org/${SLUG} /"
50- SVN_DIR=" /github /svn-${SLUG} "
42+ SVN_DIR=" ${HOME} /svn-${SLUG} "
5143
5244# Checkout just trunk and assets for efficiency
5345# Tagging will be handled on the SVN level
6961 cd " $GITHUB_WORKSPACE "
7062
7163 # "Export" a cleaned copy to a temp directory
72- TMP_DIR=" /github /archivetmp"
64+ TMP_DIR=" ${HOME} /archivetmp"
7365 mkdir " $TMP_DIR "
7466
7567 git config --global user.email " 10upbot+github@10up.com"
@@ -131,10 +123,11 @@ svn status
131123echo " ➤ Committing files..."
132124svn commit -m " Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username " $SVN_USERNAME " --password " $SVN_PASSWORD "
133125
134- if ! $GENERATE_ZIP ; then
126+ if $INPUT_GENERATE_ZIP ; then
135127 echo " Generating zip file..."
136128 cd " $SVN_DIR /trunk" || exit
137129 zip -r " ${GITHUB_WORKSPACE} /${SLUG} .zip" .
130+ echo " ::set-output name=zip-path::${GITHUB_WORKSPACE} /${SLUG} .zip"
138131 echo " ✓ Zip file generated!"
139132fi
140133
0 commit comments