From 9ecdf39b433423fd917d359f1678767cbea45617 Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Fri, 3 Feb 2023 12:42:50 -0800 Subject: [PATCH] Introduce a force update value for reloading cache #82 --- pre_cache_action.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pre_cache_action.sh b/pre_cache_action.sh index 030f3b5..bb86929 100755 --- a/pre_cache_action.sh +++ b/pre_cache_action.sh @@ -77,7 +77,11 @@ log "Creating cache key..." normalized_versioned_packages="$(normalize_package_list "${versioned_packages}")" log "- Normalized package list is '${normalized_versioned_packages}'." -value="${normalized_versioned_packages} @ ${version}" +# Forces an update in cases where an accidental breaking change was introduced +# and a global cache reset is required. +force_update_inc="0" + +value="${normalized_versioned_packages} @ ${version} ${force_update_inc}" log "- Value to hash is '${value}'." key="$(echo "${value}" | md5sum | cut -f1 -d' ')"