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