Cleaned up a few things and added a make test to do a quick build test

FossilOrigin-Name: 1a21b01b33244f3d652dece381edfb2b3b36744ae4c0ae0fc861b882484b36a1
This commit is contained in:
mek
2023-04-10 18:01:35 +00:00
parent 295995e44c
commit d11f8b1240
6 changed files with 41 additions and 155 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
set -euax
## check the usage and get the image to test
if [ $# -ne 1 ] ; then
echo 1>&2 "usage: $0 image"
exit 1
fi
image=$1
# Get the toplevel directory of the git repo
repo_dir=`git rev-parse --show-toplevel`
# See if the file for the image is available
if [ ! -f "${repo_dir}/${image}.md" ] ; then
echo 1>&2 "could not find the file for ${image}"
exit 1
fi
# Let's try to build it.
echo "attempting to build ${image} in ${repo_dir}"
${repo_dir}/scripts/tangle.tcl -R "${image}.dockerfile" "${image}.md" | \
docker build -t test:${image} -f - .
exit 0