From 02e695e925582d0f0a94c0b72eafbd8b331f0642 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Wed, 28 Feb 2018 16:36:19 +0000 Subject: [PATCH] scripts: Update push-manifest.sh with new location of key chain utility Signed-off-by: Rolf Neugebauer --- scripts/push-manifest.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/push-manifest.sh b/scripts/push-manifest.sh index 2115a6cb8..9600f7978 100755 --- a/scripts/push-manifest.sh +++ b/scripts/push-manifest.sh @@ -24,7 +24,12 @@ TAG=$(echo "$TARGET" | cut -d':' -f2) # we need them for notary on all platforms. case $(uname -s) in Darwin) - CRED=$(echo "https://index.docker.io/v1/" | /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain.bin get) + # Prior to 2018-03-27 D4M used a .bin suffix on the keychain utility binary name. Support the old name for a while + if [ -f /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain.bin ]; then + CRED=$(echo "https://index.docker.io/v1/" | /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain.bin get) + else + CRED=$(echo "https://index.docker.io/v1/" | /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain get) + fi USER=$(echo "$CRED" | jq -r '.Username') PASS=$(echo "$CRED" | jq -r '.Secret') MT_ARGS="--username $USER --password $PASS"