Skip to content

Commit

Permalink
fix: pass global args to all crane invocations
Browse files Browse the repository at this point in the history
  • Loading branch information
ahans committed Oct 4, 2024
1 parent a002daf commit 616b080
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oci/private/push.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ done
DIGEST=$("${JQ}" -r '.manifests[0].digest' "${IMAGE_DIR}/index.json")

REFS=$(mktemp)
"${CRANE}" push ${VERBOSE} "${IMAGE_DIR}" "${REPOSITORY}@${DIGEST}" "${ARGS[@]+"${ARGS[@]}"}" --image-refs "${REFS}"
"${CRANE}" push ${VERBOSE} "${IMAGE_DIR}" "${REPOSITORY}@${DIGEST}" "${ARGS[@]}" --image-refs "${REFS}"

for tag in "${TAGS[@]+"${TAGS[@]}"}"
do
"${CRANE}" tag ${VERBOSE} $(cat "${REFS}") "${tag}"
"${CRANE}" tag ${VERBOSE} "${ARGS[@]}" $(cat "${REFS}") "${tag}"
done

if [[ -e "${TAGS_FILE:-}" ]]; then
cat "${TAGS_FILE}" | xargs -r -n1 "${CRANE}" tag ${VERBOSE} $(cat "${REFS}")
cat "${TAGS_FILE}" | xargs -r -n1 "${CRANE}" tag ${VERBOSE} "${ARGS[@]}" $(cat "${REFS}")
fi

0 comments on commit 616b080

Please sign in to comment.