chore: Add build

This commit is contained in:
Timo Reymann
2023-02-15 13:25:16 +01:00
parent 762ae97a36
commit 3744a220f1
7 changed files with 43 additions and 15 deletions
+13 -4
View File
@@ -8,7 +8,16 @@ lint: ## Lint files with shellcheck
@find src/*.sh -type f -exec "shellcheck" "-x" {} \;
generate-docs: ## Build documentation using docker container
docker build . -t bash-tui-toolkit/shdoc -f .development/docs/Dockerfile
docker run --rm bash-tui-toolkit/shdoc 'shdoc < logging.sh ' 2>&1 > docs/modules/Logging.md
docker run --rm bash-tui-toolkit/shdoc 'shdoc < prompts.sh ' 2>&1 > docs/modules/Prompts.md
docker run --rm bash-tui-toolkit/shdoc 'shdoc < user_feedback.sh ' 2>&1 > docs/modules/User-Feedback.md
@docker build . -t bash-tui-toolkit/shdoc -f .development/docs/Dockerfile
@docker run --rm bash-tui-toolkit/shdoc 'shdoc < logging.sh ' 2>&1 > docs/modules/Logging.md
@docker run --rm bash-tui-toolkit/shdoc 'shdoc < prompts.sh ' 2>&1 > docs/modules/Prompts.md
@docker run --rm bash-tui-toolkit/shdoc 'shdoc < user_feedback.sh ' 2>&1 > docs/modules/User-Feedback.md
build: ## Bundle script to dist folder and remove all comments
@rm -rf dist || true
@mkdir dist/
@docker build . -t bash-tui-toolkit/builder -f .development/build/Dockerfile
@docker run --rm bash-tui-toolkit/builder 'bash_bundler bundle --entry src/main.sh --output /dev/stderr' 2> dist/bundle.sh
@sed -i '/^$$/d' dist/bundle.sh
@sed -i '/^#/d' dist/bundle.sh