Support dynamic values for PUB-CACHE-PATH (#363)

* use expand_key for PUB_CACHE_PATH

* add tests

* add dash

* use PUB_CACHE
This commit is contained in:
Nicholas Beninato
2025-06-24 14:50:48 -07:00
committed by GitHub
parent ca16aee0c3
commit fd55f4c5af
3 changed files with 11 additions and 2 deletions

View File

@@ -97,7 +97,7 @@ while getopts 'tc:k:d:l:pa:n:f:g:' flag; do
exit 1
fi
;;
g) GIT_SOURCE="$OPTARG" ;;
g) GIT_SOURCE="$OPTARG" ;;
?) exit 2 ;;
esac
done
@@ -180,6 +180,7 @@ expand_key() {
CACHE_KEY=$(expand_key "$CACHE_KEY")
PUB_CACHE_KEY=$(expand_key "$PUB_CACHE_KEY")
CACHE_PATH=$(expand_key "$(transform_path "$CACHE_PATH")")
PUB_CACHE=$(expand_key "$(transform_path "$PUB_CACHE")")
if [ "$PRINT_ONLY" = true ]; then
version_info=$(echo "$VERSION_MANIFEST" | jq -j '.channel,":",.version,":",.dart_sdk_arch // "x64"')