Add template components

This commit is contained in:
2024-12-20 14:53:02 -05:00
parent 731bf7881b
commit fd4d7fcf1b
4 changed files with 78 additions and 0 deletions

18
.post-commit-hook Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
BASE_IMAGE=$(git config get toolbox-dev-env.base-image.name)
if git config get toolbox-dev-env.base-image.version-script; then
BASE_IMAGE_VERSION=eval $(git config get toolbox-dev-env.base-image.version-script)
else
BASE_IMAGE_VERSION=$(git config get toolbox-dev-env.base-image.version)
fi
BUILD_NONCE=$(git rev-parse HEAD)
ENV_NAME=$(git config get toolbox-dev-env.name)
podman build . \
--tag "localhost/${ENV_NAME}:latest" \
--build-arg BASE_IMAGE="${BASE_IMAGE}" \
--build-arg BASE_IMAGE_VERSION="${BASE_IMAGE_VERSION}" \
--build-arg BUILD_NONCE="${BUILD_NONCE}" \
--build-arg ENV_NAME="${ENV_NAME}"