Skip to content

Commit a532410

Browse files
chore(internal): use npm pack for build uploads
1 parent c8ee824 commit a532410

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/utils/upload-artifact.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ if [[ "$SIGNED_URL" == "null" ]]; then
1212
exit 1
1313
fi
1414

15-
UPLOAD_RESPONSE=$(tar "${BASE_PATH:+-C$BASE_PATH}" -cz "${ARTIFACT_PATH:-dist}" | curl -v -X PUT \
15+
TARBALL=$(cd dist && npm pack --silent)
16+
17+
UPLOAD_RESPONSE=$(curl -v -X PUT \
1618
-H "Content-Type: application/gzip" \
17-
--data-binary @- "$SIGNED_URL" 2>&1)
19+
--data-binary "@dist/$TARBALL" "$SIGNED_URL" 2>&1)
1820

1921
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
2022
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"

0 commit comments

Comments
 (0)