Files
jc-ng/build.sh
2025-06-15 15:41:17 +01:00

21 lines
311 B
Bash
Executable File

#!/bin/bash --noprofile
set -x -o pipefail
tag=$1
build=$2
cat <<EOF >src/.buildinfo.json
{
"tag": "${tag}:${build}",
"date": "$(date -I)",
"host": "$(hostname -f)",
"user": "${USER}"
}
EOF
docker build -t ${tag}:latest .
if [[ $build != "" ]]; then
docker build -t ${tag}:${build} .
fi