Skip to content

Commit

Permalink
Use find to fix shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlewis committed Aug 9, 2024
1 parent 58a6eb2 commit 8a667b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/upload-runtime-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ GIT_REF="${2:-}"
[[ $GIT_REF =~ ^[a-f0-9]+$ ]] || (abort "fatal: invalid GIT_REF")

for STACK in "heroku-${STACK_VERSION}" "heroku-${STACK_VERSION}-build"; do
IMG_BASE=$(ls /tmp | grep -E "^${STACK}-[a-f0-9]+$" | head -n 1)
IMG_VERSION=${IMG_BASE##*-}
IMG_PATH="/tmp/${IMG_BASE}"
IMG_PATH=$(find /tmp/ -type d -maxdepth 1 | grep -E "/${STACK}-[a-f0-9]+$" | head -n 1)
IMG_VERSION=${IMG_PATH##*-}
IMG_GZ="${IMG_PATH}.img.gz"
IMG_PKG_VERSIONS="${IMG_PATH}.pkg.versions"
IMG_SHA256="${IMG_PATH}.img.sha256"
Expand Down

0 comments on commit 8a667b7

Please sign in to comment.