- name: Verify [make check/install]
run: make check/install
- # Handles Android (Termux)
- termux-test:
- runs-on: ubuntu-latest
- container:
- image: termux/termux-docker:latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install dependencies
- run: pkg update && pkg install -y git make
-
- - name: Run verification
- run: make check/install
-
# Lint job
lint:
runs-on: ubuntu-latest
docker run --rm \
-v "$PWD":/data \
-w /data \
+ --entrypoint /system/bin/sh \
termux/termux-docker:latest \
- sh -c "pkg update && pkg install -y git make \
+ -c "export PATH=/data/data/com.termux/files/usr/bin:$PATH; \
+ pkg update && pkg install -y git make \
&& make install
&& make check/install
&& git-remote-gcrypt --version"
-black $(LINT_LOCS_PY)
-isort $(LINT_LOCS_PY)
@$(call print_success,OK.)
+ @$(call print_info,Formatting YAML files...)
+ -prettier --write .github/workflows
+ @$(call print_success,OK.)
.PHONY: lint
lint: ##H Run shellcheck
# 3. Generate README
echo "Generating $README_OUT..."
-sed "s/{commands_help}/$(printf '%s\n' "$COMMANDS_HELP" | sed 's/[\/&]/\\&/g' | sed ':a;N;$!ba;s/\n/\\n/g')/" "$README_TMPL" >"$README_OUT"
+# Escape backslashes, forward slashes, and ampersands, then flatten newlines to \n
+ESCAPED_HELP=$(printf '%s\n' "$COMMANDS_HELP" | sed 's/\\/\\\\/g; s/[\/&]/\\&/g' | awk 'NR>1{printf "\\n"} {printf "%s", $0}')
+sed "s/{commands_help}/$ESCAPED_HELP/" "$README_TMPL" >"$README_OUT"
# 4. Generate Bash
echo "Generating Bash completions..."