Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gencer/cache-buildkite-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gencer committed Apr 10, 2024
2 parents 0b17fbd + 5588c87 commit b086040
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/shared.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ function expand_templates() {
TARGET="$(echo -e "${TEMPLATE_VALUE/"checksum"/""}" | tr -d \' | tr -d \" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
EXPANDED_VALUE=$(find "$TARGET" -type f -exec $HASHER_BIN {} \; | sort -k 2 | $HASHER_BIN | awk '{print $1}')
;;
"date "*)
DATE_FMT="$(echo -e "${TEMPLATE_VALUE/"date"/""}" | tr -d \' | tr -d \" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
EXPANDED_VALUE=$(date "${DATE_FMT}")
;;
"env."*)
ENV_VAR_NAME="$(echo -e "${TEMPLATE_VALUE/"env."/""}" | tr -d \' | tr -d \" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
EXPANDED_VALUE="${!ENV_VAR_NAME}"
Expand Down

0 comments on commit b086040

Please sign in to comment.