Skip to content

Commit 5eb40e1

Browse files
committed
ci: add SVN_TIMEOUT
1 parent 24b5b47 commit 5eb40e1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.env.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,4 @@ CROWDIN_PERSONAL_TOKEN=
100100

101101
SVN_USERNAME=
102102
SVN_PASSWORD=
103+
SVN_TIMEOUT=

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ SVN_ASSETS_DIR=.wordpress-org
103103
SVN_USERNAME ?=
104104
SVN_PASSWORD ?=
105105
SVN_AUTH := $(if $(and $(SVN_USERNAME),$(SVN_PASSWORD)),--username $(SVN_USERNAME) --password $(SVN_PASSWORD),)
106+
SVN_TIMEOUT ?= 600
106107

107108
# Capture script/action argument
108109
SCRIPT_ARG := $(word 2,$(MAKECMDGOALS))
@@ -333,7 +334,7 @@ endif
333334
@cd $(DIST_DIR)/$(PLUGIN_NAME) && zip -qr ../$(PLUGIN_NAME).zip .
334335

335336
deploy-svn:
336-
ifeq ($(GITHUB_ACTIONS),true)
337+
#ifeq ($(GITHUB_ACTIONS),true)
337338
@command -v svn >/dev/null 2>&1 || { echo >&2 "❌ svn is required but not installed. Aborting."; exit 1; }
338339
@echo "Checking WordPress SVN repository"
339340
@if svn ls https://plugins.svn.wordpress.org/$(PLUGIN_NAME)/ >/dev/null 2>&1; then \
@@ -358,7 +359,8 @@ ifeq ($(GITHUB_ACTIONS),true)
358359
svn add --force .; \
359360
# Removes files that have been deleted from the project \
360361
svn status | grep '^!' | awk '{print $$2}' | xargs -r svn delete; \
361-
svn $(SVN_AUTH) commit -m "Release version $(PLUGIN_VERSION)"; \
362+
# https://wplake.org/blog/how-to-publish-your-own-wordpress-plugin/ \
363+
svn $(SVN_AUTH) --config-option=servers:global:http-timeout=$(SVN_TIMEOUT) commit -m "Release version $(PLUGIN_VERSION)"; \
362364
}; \
363365
# Do not delete DIST_DIR completely, because it is mounted as a volume by docker-compose \
364366
rm -rf $(TMP_DIR)/$(SVN_DIR) $(DIST_DIR)/$(PLUGIN_NAME); \
@@ -369,9 +371,9 @@ ifeq ($(GITHUB_ACTIONS),true)
369371
else \
370372
echo "❌ SVN repository does not exist, skipping..."; \
371373
fi
372-
else
373-
@echo "❌ SVN deployment only available in CI, skipping.."
374-
endif
374+
#else
375+
# @echo "❌ SVN deployment only available in CI, skipping.."
376+
#endif
375377

376378
crowdin-upload: setup
377379
ifneq ($(and $(CROWDIN_PROJECT_ID),$(CROWDIN_PERSONAL_TOKEN)),)

0 commit comments

Comments
 (0)