diff --git a/images/minideb/minideb.sh b/images/minideb/minideb.sh index 64d2003..a841cb0 100755 --- a/images/minideb/minideb.sh +++ b/images/minideb/minideb.sh @@ -7,6 +7,9 @@ set -e; # These can all be changed via environment variables. clone_url="${clone_url:-https://github.com/bitnami/minideb.git}"; +# The ref to checkout. Could be a branch name or a specific commit. +# In this case this is the last commit before google cloud was added +ref="e8efb17bd6859d2a40205e6ddfcd633d662968cf"; image_version="${image_version:-buster}"; apply_patch_raspbian="${apply_patch_raspbian:-true}"; @@ -84,7 +87,9 @@ trap on_exit EXIT; log_msg "Cloning minideb"; git clone "${clone_url}" "${temp_dir}/minideb"; -cd "${temp_dir}/minideb"; +cd "${temp_dir}/minideb" || { echo "Error: Failed to cd into minideb cloned git repository" >&2; exit 1; }; +git checkout "${ref}"; + if [[ "${apply_patch_raspbian}" == "true" ]]; then log_msg "Applying Raspbian patch"; git apply "${config_dir}/minideb-raspbian.patch";