From 789e4a5ffb30f2bb749048d3d49332acbcda046e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Behrendt?= Date: Thu, 19 Dec 2024 10:59:57 +0100 Subject: [PATCH] chore(cli): skip directories in CLI release (#744) --- 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"