Commit 9bb70cb1 authored by Erick Hitter's avatar Erick Hitter

Trigger static-asset cleanup by ensuring directory exists, even when empty

parent 044735c6
Pipeline #818 passed with stage
in 1 minute and 9 seconds
...@@ -8,7 +8,7 @@ set -eo ...@@ -8,7 +8,7 @@ set -eo
# Provide a basic version identifier, particularly since this script # Provide a basic version identifier, particularly since this script
# is usually accessed via CDN. # is usually accessed via CDN.
echo "ℹ︎ WP-ORG-PLUGIN-DEPLOY VERSION: 2019041402" echo "ℹ︎ WP-ORG-PLUGIN-DEPLOY VERSION: 2019041403"
if [[ -z "$CI" ]]; then if [[ -z "$CI" ]]; then
echo "𝘅︎ Script is only to be run by GitLab CI" 1>&2 echo "𝘅︎ Script is only to be run by GitLab CI" 1>&2
...@@ -43,6 +43,12 @@ if [[ -z "$WP_ORG_ASSETS_DIR" ]]; then ...@@ -43,6 +43,12 @@ if [[ -z "$WP_ORG_ASSETS_DIR" ]]; then
WP_ORG_ASSETS_DIR=".wordpress-org" WP_ORG_ASSETS_DIR=".wordpress-org"
fi fi
# Create empty static-assets directory if needed, triggering
# removal of any stray assets in svn.
if [[ ! -d "${CI_PROJECT_DIR}/${WP_ORG_ASSETS_DIR}/" ]]; then
mkdir -p "${CI_PROJECT_DIR}/${WP_ORG_ASSETS_DIR}/"
fi
echo "ℹ︎ PLUGIN_SLUG: ${PLUGIN_SLUG}" echo "ℹ︎ PLUGIN_SLUG: ${PLUGIN_SLUG}"
echo "ℹ︎ PLUGIN_VERSION: ${PLUGIN_VERSION}" echo "ℹ︎ PLUGIN_VERSION: ${PLUGIN_VERSION}"
echo "ℹ︎ WP_ORG_RELEASE_REF: ${WP_ORG_RELEASE_REF}" echo "ℹ︎ WP_ORG_RELEASE_REF: ${WP_ORG_RELEASE_REF}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment