Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
docs: move publishing shell snippet out of Makefile
Merged liw opened 1 year ago

Makefiles are an extra layer of escaping that doesn’t help.

Signed-off-by: Lars Wirzenius liw@liw.fi

2 files changed +17 -12 b165bf3d 98db404e
modified doc/Makefile
@@ -17,17 +17,6 @@
all: architecture.html

publish: all
-
	if [ "$$(git branch --show-current)" = main ]; then \
-
            echo on main branch; \
-
	    if [ "$${RADICLE_CI_BROKER_WEBROOT:-unset}" != unset ]; then \
-
		    echo web root set, publishing arch doc there; \
-
		    install -d -m 0755 "$(RADICLE_CI_BROKER_WEBROOT)"; \
-
		    install -m 0644 *.html "$(RADICLE_CI_BROKER_WEBROOT)"; \
-
	    else \
-
		echo web root is not set, not publishing arch doc; \
-
	    fi; \
-
	else \
-
	    echo not on main branch; \
-
	fi
+
	bash publish.sh

architecture.html: architecture.svg architecture-ext.svg comp.svg comp-ext.svg Makefile
added doc/publish.sh
@@ -0,0 +1,16 @@
+
#!/bin/bash
+

+
set -xeuo pipefail
+

+
if [ "$(git branch --show-current)" = publish ]; then
+
	echo on main branch
+
	if [ "${RADICLE_CI_BROKER_WEBROOT:-unset}" != unset ]; then
+
		echo web root set, publishing arch doc there
+
		install -d -m 0755 "$RADICLE_CI_BROKER_WEBROOT"
+
		install -m 0644 *.html "$RADICLE_CI_BROKER_WEBROOT"
+
	else
+
		echo web root is not set, not publishing arch doc
+
	fi
+
else
+
	echo not on main branch
+
fi