From 07c39c7cc57d0b4b3cac64c600c3440d3e39f837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Behrendt?= Date: Thu, 19 Dec 2024 10:51:10 +0100 Subject: [PATCH] chore(cli): skip directories in CLI release --- clients/cli/build/release.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clients/cli/build/release.sh b/clients/cli/build/release.sh index 0f15e874..e29198c8 100755 --- a/clients/cli/build/release.sh +++ b/clients/cli/build/release.sh @@ -56,10 +56,12 @@ fi # Upload artifacts DIST_DIR="./dist" for file in "$DIST_DIR"/*; do - echo "Uploading ${file}" - asset="https://uploads.github.com/repos/phrase/phrase-cli/releases/${release_id}/assets?name=$(basename "$file")" - curl -sS --data-binary @"$file" -H "Authorization: token ${GITHUB_TOKEN}" -H "Content-Type: application/octet-stream" $asset > /dev/null - echo Hash: $(sha256sum $file) + if [ -f "$file" ]; then + echo "Uploading ${file}" + asset="https://uploads.github.com/repos/phrase/phrase-cli/releases/${release_id}/assets?name=$(basename "$file")" + curl -sS --data-binary @"$file" -H "Authorization: token ${GITHUB_TOKEN}" -H "Content-Type: application/octet-stream" $asset > /dev/null + echo Hash: $(sha256sum $file) + fi done echo "Publishing release"