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++))
|
||||
|
@ -33,12 +33,12 @@ function ScriptItem({
|
||||
const closeScript = () => {
|
||||
window.history.pushState({}, document.title, window.location.pathname);
|
||||
setSelectedScript(null);
|
||||
};
|
||||
};
|
||||
|
||||
const [versions, setVersions] = useState<AppVersion[]>([]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
useEffect(() => {
|
||||
fetchVersions()
|
||||
.then((fetchedVersions) => {
|
||||
console.log("Fetched Versions: ", fetchedVersions);
|
||||
@ -51,11 +51,11 @@ useEffect(() => {
|
||||
}
|
||||
})
|
||||
.catch((error) => console.error("Error fetching versions:", error));
|
||||
}, []);
|
||||
}, []);
|
||||
|
||||
const defaultInstallMethod = item.install_methods?.[0];
|
||||
const os = defaultInstallMethod?.resources?.os || "Proxmox Node";
|
||||
const version = defaultInstallMethod?.resources?.version || "";
|
||||
const defaultInstallMethod = item.install_methods?.[0];
|
||||
const os = defaultInstallMethod?.resources?.os || "Proxmox Node";
|
||||
const version = defaultInstallMethod?.resources?.version || "";
|
||||
|
||||
|
||||
return (
|
||||
@ -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