mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-19 21:07:53 +00:00
Docs: Show available tools per version in README.md
This commit is contained in:
parent
448054bece
commit
894706ab09
@ -6,12 +6,24 @@ endif
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Misc Targets
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
update-readme:
|
||||
.PHONY: update-readme
|
||||
update-readme: _update-readme-modules
|
||||
update-readme: _update-readme-tools
|
||||
|
||||
.PHONY: _update-readme-modules
|
||||
_update-readme-modules:
|
||||
cat "../README.md" \
|
||||
| perl -0 -pe "s#<!-- modules -->.*<!-- /modules -->#<!-- modules -->\n$$(./scripts/get-modules.sh)\n<!-- /modules -->#s" \
|
||||
> "../README.md.tmp"
|
||||
yes | mv -f "../README.md.tmp" "../README.md"
|
||||
|
||||
.PHONY: _update-readme-tools
|
||||
_update-readme-tools:
|
||||
cat "../README.md" \
|
||||
| perl -0 -pe "s#<!-- tools -->.*<!-- /tools -->#<!-- tools -->\n$$(./scripts/get-tools.sh)\n<!-- /tools -->#s" \
|
||||
> "../README.md.tmp"
|
||||
yes | mv -f "../README.md.tmp" "../README.md"
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Linting Targets
|
||||
|
25
.tests/scripts/get-tools.sh
Executable file
25
.tests/scripts/get-tools.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# NOTE: Parsing curl to tac to circumnvent "failed writing body"
|
||||
# https://stackoverflow.com/questions/16703647/why-curl-return-and-error-23-failed-writing-body
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
SCRIPT_PATH="$( cd "$(dirname "$0")" && pwd -P )"
|
||||
DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"
|
||||
# shellcheck disable=SC1090
|
||||
. "${SCRIPT_PATH}/.lib.sh"
|
||||
|
||||
RETRIES=10
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# FUNCTIONS
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
PHP_TAG="$( grep 'devilbox/php' "${DVLBOX_PATH}/docker-compose.yml" | sed 's/^.*-work-//g' )"
|
||||
PHP_TOOLS="$( run "curl -sS 'https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/doc/available-tools.md'" "${RETRIES}" )";
|
||||
|
||||
echo "${PHP_TOOLS}" | grep -A 1000000 'TOOLS_WORK_START'
|
@ -68,7 +68,6 @@ The Devilbox runs on all major operating systems and its only requirement is <co
|
||||
* [Docker Compose 1.16.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-23)
|
||||
</details>
|
||||
|
||||
<br/>
|
||||
Be up and running in 2 minutes.
|
||||
<details style="margin-bottom:0px !important;"><summary>🚀 Install and Run: Linux</summary>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user