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
|
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=$(curl -s -H "X-Key: $token" "https://api.newreleases.io/v1/projects/$id/latest-release")
|
||||||
version_data=$(echo "$version" | jq -r '.version // empty')
|
version_data=$(echo "$version" | jq -r '.version // empty')
|
||||||
|
version_date=$(echo "$version" | jq -r '.date // empty')
|
||||||
if [ -n "$version_data" ]; then
|
if [ -n "$version_data" ]; then
|
||||||
jq --arg name "$name" --arg version "$version_data" \
|
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
|
fi
|
||||||
done
|
done
|
||||||
((page++))
|
((page++))
|
||||||
|
@ -98,13 +98,15 @@ const version = defaultInstallMethod?.resources?.version || "";
|
|||||||
<DefaultSettings item={item} />
|
<DefaultSettings item={item} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
|
||||||
{versions.length === 0 ? (
|
{versions.length === 0 ? (
|
||||||
<p>Loading versions...</p>
|
<p>Loading versions...</p>
|
||||||
) : (
|
) : (
|
||||||
<p>Version: {
|
<p>Version: { versions.find((v) =>
|
||||||
versions.find((v) => v.name === item.slug.replace(/[^a-z0-9]/g, ''))?.version || "Not found"
|
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>
|
}</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user