Workflow update
This commit is contained in:
parent
f306dbd4fb
commit
81c4869530
@ -63,9 +63,10 @@ jobs:
|
||||
jq -r '.projects[] | "\(.id) \(.name)"' "$projects_file" | while read -r id name; do
|
||||
version=$(curl -s -H "X-Key: $token" "https://api.newreleases.io/v1/projects/$id/latest-release")
|
||||
version_data=$(echo "$version" | jq -r '.version // empty')
|
||||
version_date=$(echo "$version" | jq -r '.date // empty')
|
||||
if [ -n "$version_data" ]; then
|
||||
jq --arg name "$name" --arg version "$version_data" \
|
||||
'. += [{"name": $name, "version": $version}]' "$output_file" > "$output_file.tmp" && mv "$output_file.tmp" "$output_file"
|
||||
'. += [{"name": $name, "version": $version, "date": $version_date}]' "$output_file" > "$output_file.tmp" && mv "$output_file.tmp" "$output_file"
|
||||
fi
|
||||
done
|
||||
((page++))
|
||||
|
@ -98,13 +98,15 @@ const version = defaultInstallMethod?.resources?.version || "";
|
||||
<DefaultSettings item={item} />
|
||||
</div>
|
||||
<div>
|
||||
|
||||
|
||||
{versions.length === 0 ? (
|
||||
<p>Loading versions...</p>
|
||||
) : (
|
||||
<p>Version: {
|
||||
versions.find((v) => v.name === item.slug.replace(/[^a-z0-9]/g, ''))?.version || "Not found"
|
||||
<p>Version: { versions.find((v) =>
|
||||
v.name === item.slug.replace(/[^a-z0-9]/g, '') ||
|
||||
v.name.includes(item.slug.replace(/[^a-z0-9]/g, '')) ||
|
||||
v.name.replace(/[^a-z0-9]/g, '') === item.slug.replace(/[^a-z0-9]/g, '')
|
||||
|
||||
)?.version || "Not found"
|
||||
}</p>
|
||||
)}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user