You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
452 B

1 month ago
  1. #!/bin/bash
  2. # compose: no-hooks
  3. . $CHARM_PATH/lib/common
  4. image_version=${DOCKER_BASE_IMAGE##*:} ## retrieve tag
  5. image_version=${image_version%%-*} ## remove suffix
  6. version=$(nextcloud:config:version) || {
  7. err "Failed to retrieve version"
  8. exit 1
  9. }
  10. version=${version:-N/A} ## remove suffix
  11. msg=()
  12. if [ "$version" != "$image_version" ]; then
  13. msg+=("image version mismatch ($image_version)")
  14. fi
  15. printf "%s\n" "$version" "${msg[@]}"