Skip to content

Commit 43e313a

Browse files
committed
cover relative paths with leading dot
1 parent 39c57d5 commit 43e313a

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

deploy.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,18 @@ if [[ -z "$ASSETS_DIR" ]]; then
3838
fi
3939
echo "ℹ︎ ASSETS_DIR is $ASSETS_DIR"
4040

41-
if [[ -z "$BUILD_DIR" ]]; then
41+
if [[ -z "$BUILD_DIR" ]] || [[ $BUILD_DIR == "./" ]]; then
4242
BUILD_DIR=false
43-
elif [[ $BUILD_DIR != /* ]]; then
44-
BUILD_DIR="${GITHUB_WORKSPACE%/}/${BUILD_DIR}"
43+
elif [[ $BUILD_DIR == ./* ]]; then
44+
BUILD_DIR=${BUILD_DIR:2}
45+
fi
46+
47+
if [[ "$BUILD_DIR" != false ]]; then
48+
if [[ $BUILD_DIR != /* ]]; then
49+
BUILD_DIR="${GITHUB_WORKSPACE%/}/${BUILD_DIR}"
50+
fi
51+
echo "ℹ︎ BUILD_DIR is $BUILD_DIR"
4552
fi
46-
echo "ℹ︎ BUILD_DIR is $BUILD_DIR"
4753

4854
SVN_URL="https://plugins.svn.wordpress.org/${SLUG}/"
4955
SVN_DIR="${HOME}/svn-${SLUG}"

0 commit comments

Comments
 (0)