diff --git a/c-relay-5.0.0.tar.gz b/c-relay-5.0.0.tar.gz new file mode 100644 index 0000000..97749c9 Binary files /dev/null and b/c-relay-5.0.0.tar.gz differ diff --git a/increment_and_push.sh b/increment_and_push.sh index f758c26..9ff5892 100755 --- a/increment_and_push.sh +++ b/increment_and_push.sh @@ -424,14 +424,14 @@ create_gitea_release() { if echo "$response" | grep -q '"id"'; then print_success "Created release $NEW_VERSION" # Extract release ID for asset uploads - local release_id=$(echo "$response" | grep -o '"id":[0-9]*' | cut -d':' -f2) + local release_id=$(echo "$response" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2) echo $release_id elif echo "$response" | grep -q "already exists"; then print_warning "Release $NEW_VERSION already exists" # Try to get existing release ID local check_response=$(curl -s -H "Authorization: token $token" "$api_url/releases/tags/$NEW_VERSION") if echo "$check_response" | grep -q '"id"'; then - local release_id=$(echo "$check_response" | grep -o '"id":[0-9]*' | cut -d':' -f2) + local release_id=$(echo "$check_response" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2) print_status "Using existing release ID: $release_id" echo $release_id fi @@ -445,7 +445,7 @@ create_gitea_release() { local check_response=$(curl -s -H "Authorization: token $token" "$api_url/releases/tags/$NEW_VERSION") if echo "$check_response" | grep -q '"id"'; then print_warning "Release exists but creation response was unexpected" - local release_id=$(echo "$check_response" | grep -o '"id":[0-9]*' | cut -d':' -f2) + local release_id=$(echo "$check_response" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2) echo $release_id else print_error "Release does not exist and creation failed"