Closed DininduSenanayake closed 2 months ago
We should be able to extract the version from Models
command with
# Verify the built version
BUILT_VERSION=$(apptainer exec ${IMAGE_PATH}/apsim-${APSIM_VERSION}.aimg Models | grep APSIM | awk -F'[ ©]' '{print $2}')
Appears to be working
$ BUILT_VERSION=$(apptainer exec apsim-2024.08.7572.0.aimg Models | grep APSIM | awk -F'[ ©]' '{print $2}')
$ echo $BUILT_VERSION
2024.8.7572.0
Close once https://github.com/DininduSenanayake/APSIM-eri-mahuika/pull/22 is merged
Once the container image was built, it will be ideal to verify at the end by running
$ apptainer exec apsim-2024.08.7572.0.aimg Models
command and match the version printed inAPSIM 2024.8.7572.0
with the value assigned toVERSION=${YEAR.MONTH}.${TAG}.0
This is can be incorporated to the same slurm script which build the container image as a post-build step