Skip to content

Commit e2e6ac3

Browse files
committed
fix: Fjernet en del logging nå som vi fikk kjørt igjennom alt
1 parent f186160 commit e2e6ac3

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

.github/workflows/buildAndPublish.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,6 @@ jobs:
204204
--argjson body "$body" \
205205
'{tag_name: $tag, name: $name, body: $body}')
206206
207-
echo "JSON Payload:"
208-
echo "$json_payload"
209-
210207
response=$(curl -s -w "\n%{http_code}" \
211208
-H "Accept: application/vnd.github.v3+json" \
212209
-H "Authorization: token ${NODE_AUTH_TOKEN}" \
@@ -216,10 +213,6 @@ jobs:
216213
status=$(echo "$response" | tail -n1)
217214
body=$(echo "$response" | sed '$d')
218215
219-
echo "HTTP Status: $status"
220-
echo "Response Body:"
221-
echo "$body"
222-
223216
if [ "$status" -ne 201 ]; then
224217
echo "${red}Failed to create release (HTTP $status)${reset}"
225218
echo "Response: $body"
@@ -229,7 +222,7 @@ jobs:
229222
UPLOAD_URL=$(echo "$body" | jq -r '.upload_url | sub("\\{.*$"; "") // ""')
230223
if [ -z "$UPLOAD_URL" ]; then
231224
echo "${red}Failed to extract upload_url from response${reset}"
232-
echo "Parsed output: $(echo "$body" | jq '.')"
225+
echo "Response: $body"
233226
exit 1
234227
fi
235228
echo "Release created successfully. Upload URL: $UPLOAD_URL"
@@ -240,9 +233,6 @@ jobs:
240233
failure_count=0
241234
max_retries=2
242235
243-
echo "Files to upload:"
244-
ls -l releases/${RELEASE_NAME}/ || echo "No files found in releases/${RELEASE_NAME}/"
245-
246236
for file in releases/${RELEASE_NAME}/*; do
247237
if [ -f "$file" ]; then
248238
filename=$(basename "$file")
@@ -251,7 +241,6 @@ jobs:
251241
success=false
252242
253243
while [ $attempt -lt $max_retries ] && [ "$success" = false ]; do
254-
echo "Attempt $((attempt + 1)) for $filename"
255244
upload_response=$(curl -s -w "\n%{http_code}" \
256245
-H "Authorization: token ${NODE_AUTH_TOKEN}" \
257246
-H "Content-Type: application/octet-stream" \
@@ -261,20 +250,18 @@ jobs:
261250
upload_status=$(echo "$upload_response" | tail -n1)
262251
upload_body=$(echo "$upload_response" | sed '$d')
263252
264-
echo "curl exit code: $curl_exit_code"
265-
echo "Upload status: $upload_status"
266-
echo "Upload body: $upload_body"
267-
268253
if [ $curl_exit_code -ne 0 ]; then
269254
echo "${red}curl command failed with exit code $curl_exit_code${reset}"
255+
echo "Upload Response: $upload_response"
270256
((attempt++))
271257
[ $attempt -lt $max_retries ] && sleep 2
272258
elif [ "$upload_status" -eq 201 ]; then
273259
echo "${green}Successfully uploaded $filename (HTTP $upload_status)${reset}"
274260
success=true
275261
((success_count++))
276262
else
277-
echo "${red}Upload attempt $attempt failed for $filename (HTTP $upload_status)${reset}"
263+
echo "${red}Upload attempt $((attempt + 1)) failed for $filename (HTTP $upload_status)${reset}"
264+
echo "Upload Response: $upload_body"
278265
((attempt++))
279266
[ $attempt -lt $max_retries ] && sleep 2
280267
fi

0 commit comments

Comments
 (0)