docs(agents): refine bash guidelines and update code samples

- Expand AGENTS.md with general agent guidance and coding conventions
- Refactor bash snippets in README.md and scripts to align with style guide:
  - Use `#!/usr/bin/env bash` shebang for portability
  - Remove `function` keyword from definitions
  - Replace `[ ]` conditionals with `[[ ]]` for improved reliability
  - Rename local variables to lowercase with `local` keyword
- Introduce CHANGELOG.md to track project changes per Keep a Changelog spec
- Update taskfile.build scripts to follow consistent bash practices
This commit is contained in:
Janik von Rotz committed 2025-10-29 12:32:51 +01:00
1 parent cb0f9330af
commit 5b992d4ee0
25 files changed
+386 -322

No files matched your search

+6 -7
View File
@@ -1,17 +1,16 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
echo "pnpm version: $(pnpm --version)"
echo "hugo version: $(hugo version)"
if [ -z "$GIT_URL" ]; then
if [[ -z "$GIT_URL" ]]; then
echo "Error: GIT_URL environment variable is required." >&2
exit 1
fi
GIT_PATH="/app/repo"
if [ ! -d "$GIT_PATH" ]; then
if [[ ! -d "$GIT_PATH" ]]; then
echo "Cloning git repo: $GIT_URL"
git clone "$GIT_URL" "$GIT_PATH"
else
@@ -19,15 +18,15 @@ else
git -C "$GIT_PATH" pull
fi
if [ -f "$GIT_PATH/.gitmodules" ]; then
if [[ -f "$GIT_PATH/.gitmodules" ]]; then
echo "Found .gitmodules, initializing submodules."
git -C "$GIT_PATH" submodule init
git -C "$GIT_PATH" submodule update --recursive
fi
if [ -f "${GIT_PATH}/task" ]; then
if [[ -f "${GIT_PATH}/task" ]]; then
if [ -z "$TASK_COMMANDS" ]; then
if [[ -z "$TASK_COMMANDS" ]]; then
echo "Error: TASK_COMMANDS environment variable is required." >&2
exit 1
fi