|
|
@ -0,0 +1,24 @@ |
|
|
|
#!/bin/bash |
|
|
|
# compose: no-hooks |
|
|
|
|
|
|
|
. $CHARM_PATH/lib/common |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
image_version=${DOCKER_BASE_IMAGE##*:} ## retrieve tag |
|
|
|
image_version=${image_version%%-*} ## remove suffix |
|
|
|
|
|
|
|
version=$(nextcloud:config:version) || { |
|
|
|
err "Failed to retrieve version" |
|
|
|
exit 1 |
|
|
|
} |
|
|
|
|
|
|
|
version=${version:-N/A} ## remove suffix |
|
|
|
|
|
|
|
msg=() |
|
|
|
if [ "$version" != "$image_version" ]; then |
|
|
|
msg+=("image version mismatch ($image_version)") |
|
|
|
fi |
|
|
|
|
|
|
|
printf "%s\n" "$version" "${msg[@]}" |