Skip to content

Commit

Permalink
prismlauncher-git: Update checkver
Browse files Browse the repository at this point in the history
  • Loading branch information
sokripon committed Sep 30, 2024
1 parent d46530a commit 9cffc1f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions bucket/prismlauncher-git.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "7.0-a634512",
"version": "9.0-a634512",
"description": "An open source Minecraft launcher with the ability to manage multiple instances, accounts and mods. Focused on user freedom and free redistributability.",
"homepage": "https://prismlauncher.org/",
"license": "GPL-3.0-only",
Expand Down Expand Up @@ -31,10 +31,16 @@
]
],
"checkver": {
"url": "https://api.github.com/repositories/553135896/actions/workflows/trigger_builds.yml/runs?branch=develop&status=success",
"jsonpath": "$.workflow_runs[0].head_sha",
"regex": "(?<sha>\\A[a-f\\d]{0,7})",
"replace": "7.0-${sha}"
"script": [
"$apiUrl = 'https://api.github.com/repositories/553135896/actions/workflows/trigger_builds.yml/runs?branch=develop&status=success'",
"$fullSha = (Invoke-RestMethod -Uri $apiUrl).workflow_runs[0].head_sha",
"$cmakeContent = Invoke-WebRequest \"https://raw.githubusercontent.com/PrismLauncher/PrismLauncher/$fullSha/CMakeLists.txt\" | Select-Object -ExpandProperty Content",
"$majorVersion = [regex]::Match($cmakeContent, 'set\\(Launcher_VERSION_MAJOR (\\d+)\\)').Groups[1].Value",
"$minorVersion = [regex]::Match($cmakeContent, 'set\\(Launcher_VERSION_MINOR (\\d+)\\)').Groups[1].Value",
"$version = \"$majorVersion.$minorVersion-$fullSha\"",
"$version"
],
"regex": "([\\d.]+\\-[a-f0-9]{7,7})"
},
"autoupdate": {
"architecture": {
Expand Down

0 comments on commit 9cffc1f

Please sign in to comment.