Add template components
This commit is contained in:
18
.post-commit-hook
Executable file
18
.post-commit-hook
Executable 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}"
|
||||
Reference in New Issue
Block a user