#!/bin/bash

# This is a script to build the modules and run the test suite in the base
# Docker container.

set -x
set -o

cd /usr/src/ITKUltrasound
branch=$(git rev-parse --abbrev-ref HEAD)
date=$(date +%F_%H_%M_%S)
sha=$(git rev-parse --short HEAD)

cd /usr/src/ITKUltrasound-build

cmake \
  -G Ninja \
  -DITK_DIR:PATH=/usr/src/ITK-build \
  -DITKUltrasound_USE_VTK:BOOL=ON \
  -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DBUILDNAME:STRING=External-Ultrasound-${branch}-${date}-${sha} \
    /usr/src/ITKUltrasound
ctest -VV -D Experimental

#!/bin/bash

# This is a script to build the modules and run the test suite in the base
# Docker container.

set -x
set -o

cd /usr/src/ITKUltrasound-build

cmake \
  -G Ninja \
  -DITK_DIR:PATH=/usr/src/ITK-build \
  -DITKUltrasound_USE_VTK:BOOL=ON \
  -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DBUILDNAME:STRING=External-Ultrasound \
    /usr/src/ITKUltrasound
ctest -VV -D Experimental

--- 
+++ 
@@ -5,6 +5,11 @@
 
 set -x
 set -o
+
+cd /usr/src/ITKUltrasound
+branch=$(git rev-parse --abbrev-ref HEAD)
+date=$(date +%F_%H_%M_%S)
+sha=$(git rev-parse --short HEAD)
 
 cd /usr/src/ITKUltrasound-build
 
@@ -14,6 +19,6 @@
   -DITKUltrasound_USE_VTK:BOOL=ON \
   -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
   -DCMAKE_BUILD_TYPE:STRING=Release \
-  -DBUILDNAME:STRING=External-Ultrasound \
+  -DBUILDNAME:STRING=External-Ultrasound-${branch}-${date}-${sha} \
     /usr/src/ITKUltrasound
 ctest -VV -D Experimental
ENH: Add branch, sha, and build information to the BUILDNAME.
