Skip to content

Commit

Permalink
occt: Handle nextjs buildId updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brian6932 committed Oct 26, 2024
1 parent 09c5249 commit d3306c4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bucket/occt.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@
]
],
"checkver": {
"url": "https://www.ocbase.com/_next/data/Ek0YdNtyFoF6iJb1yB8ho/download.json",
"jsonpath": "$.pageProps.occtReleases[0].stable.release.version.versionStr"
"script": [
"try {",
" $null = (Invoke-WebRequest $url).Content -cmatch '/_next/static/([^/]+)/_buildManifest\\.js'",
" ($Matches[1], (Invoke-RestMethod \"https://www.ocbase.com/_next/data/$($Matches[1])/download.json\").pageProps.occtReleases[0].stable.release.version.versionStr) -join ' '",
"}",
"catch { '' }"
],
"regex": "\\A(?<buildid>[^/ ]+) ([\\d.]+)\\Z"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://dl.ocbase.com/per/stable/OCCT.exe",
"hash": {
"url": "https://www.ocbase.com/_next/data/Ek0YdNtyFoF6iJb1yB8ho/download.json",
"url": "https://www.ocbase.com/_next/data/$matchBuildid/download.json",
"jsonpath": "$.pageProps.occtReleases[0].stable.release.checksum"
}
}
Expand Down

0 comments on commit d3306c4

Please sign in to comment.