add ability to build local variants from a ./.code directory
This commit is contained in:
12
build.sh
12
build.sh
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
shopt -s extglob
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
readonly DIR="$(cd "$(dirname "$0")"; pwd)"
|
||||
|
||||
if (( $# == 0 )); then
|
||||
readonly images=(core basic !(template|core|basic)/)
|
||||
@@ -11,5 +11,13 @@ else
|
||||
fi
|
||||
|
||||
for image in "${images[@]}"; do
|
||||
podman build -t "code-${image%/}" -f "${image%/}/Containerfile"
|
||||
if [[ "$image" == '.' ]]; then
|
||||
tag="$(basename "$(pwd)")"
|
||||
contdir='.code'
|
||||
else
|
||||
tag="$image"
|
||||
contdir="$DIR/${image%/}"
|
||||
fi
|
||||
|
||||
podman build -t "code-${tag}" -f "${contdir}/Containerfile"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user