Cleaned up a few things and added a make test to do a quick build test
FossilOrigin-Name: 1a21b01b33244f3d652dece381edfb2b3b36744ae4c0ae0fc861b882484b36a1
This commit is contained in:
Executable
+26
@@ -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
|
||||
Reference in New Issue
Block a user