Skip to content

Commit

Permalink
Merge pull request #5 from pl-strflt/galargh-patch-2
Browse files Browse the repository at this point in the history
Update action.yml
  • Loading branch information
galargh committed Jun 14, 2023
2 parents c077e01 + db6848c commit e3bd531
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ runs:
continue
fi
key="$(jq -nr '$file | sub($dir;"") | sub("/\\d+_";"/") | sub("^/";"") | sub("\\.txt";"")' --arg dir "$dir" --arg file "$file")"
value="$(jq -Rs 'split("\r\n") | map(select(. == "" | not)) | map(split(" ")) | map({"time": .[0], "message": .[1:] | join(" ")})' "$file")"
value="$(jq -Rs 'split("\n") | map(select(. == "" | not)) | map(split(" ")) | map({"time": .[0], "message": .[1:] | join(" ")})' "$file")"
logs="$(jq -n '$logs | .[$key] = $value' --arg key "$key" --argjson value "$value" --argjson logs "$logs")"
done <<< "$(find "$dir" -name "*.txt")"
rm -rf "$dir" "$zip"
Expand Down

0 comments on commit e3bd531

Please sign in to comment.