Skip to content

Commit 2108224

Browse files
committed
intellij-jbr*: use script to sort versions
1 parent db04291 commit 2108224

8 files changed

+202
-50
lines changed

bucket/intellij-jbr17-jcef.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,27 @@
2020
},
2121
"env_add_path": "bin",
2222
"checkver": {
23-
"url": "https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases",
24-
"jsonpath": "$[?(@.tag_name =~ /^jbr-release-17\\./)].tag_name",
23+
"script": [
24+
"$url = 'https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases'",
25+
"$releases = Invoke-RestMethod $url",
26+
"$tags = $releases | ForEach-Object { $_.tag_name }",
27+
"# `$Script:expected_ver` is current version for fallback",
28+
"$tags += 'jbr-release-' + ($Script:expected_ver -replace '-', '')",
29+
"$pattern = 'jbr-release-17\\.(?<Version>[\\d.]+)b(?<BuildNum>[\\d]+)\\.(?<Patch>\\d+)'",
30+
"$matches = foreach ($t in $tags) { if ($t -match $pattern) {",
31+
" [PSCustomObject]@{",
32+
" Tag = $t",
33+
" VersionParts = ($Matches.Version -split '\\.') | ForEach-Object { [int]$_ }",
34+
" BuildNum = [int]$Matches.BuildNum",
35+
" Patch = [int]$Matches.Patch",
36+
" }",
37+
" } }",
38+
"$latest = $matches | Sort-Object @{Expression={$_.VersionParts[0]}},",
39+
" @{Expression={$_.VersionParts[1]}},",
40+
" @{Expression={$_.BuildNum}},",
41+
" @{Expression={$_.Patch}} | Select-Object -Last 1",
42+
"Write-Output $latest.Tag"
43+
],
2544
"regex": "jbr-release-17\\.(?<Version>[\\d.]+)(?<Build>[\\w]+)\\.(?<Patch>[\\d]+)",
2645
"replace": "17.${Version}-${Build}.${Patch}"
2746
},

bucket/intellij-jbr17-sdk-jcef.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,27 @@
2020
},
2121
"env_add_path": "bin",
2222
"checkver": {
23-
"url": "https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases",
24-
"jsonpath": "$[?(@.tag_name =~ /^jbr-release-17\\./)].tag_name",
23+
"script": [
24+
"$url = 'https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases'",
25+
"$releases = Invoke-RestMethod $url",
26+
"$tags = $releases | ForEach-Object { $_.tag_name }",
27+
"# `$Script:expected_ver` is current version for fallback",
28+
"$tags += 'jbr-release-' + ($Script:expected_ver -replace '-', '')",
29+
"$pattern = 'jbr-release-17\\.(?<Version>[\\d.]+)b(?<BuildNum>[\\d]+)\\.(?<Patch>\\d+)'",
30+
"$matches = foreach ($t in $tags) { if ($t -match $pattern) {",
31+
" [PSCustomObject]@{",
32+
" Tag = $t",
33+
" VersionParts = ($Matches.Version -split '\\.') | ForEach-Object { [int]$_ }",
34+
" BuildNum = [int]$Matches.BuildNum",
35+
" Patch = [int]$Matches.Patch",
36+
" }",
37+
" } }",
38+
"$latest = $matches | Sort-Object @{Expression={$_.VersionParts[0]}},",
39+
" @{Expression={$_.VersionParts[1]}},",
40+
" @{Expression={$_.BuildNum}},",
41+
" @{Expression={$_.Patch}} | Select-Object -Last 1",
42+
"Write-Output $latest.Tag"
43+
],
2544
"regex": "jbr-release-17\\.(?<Version>[\\d.]+)(?<Build>[\\w]+)\\.(?<Patch>[\\d]+)",
2645
"replace": "17.${Version}-${Build}.${Patch}"
2746
},

bucket/intellij-jbr17-sdk.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,27 @@
2525
},
2626
"env_add_path": "bin",
2727
"checkver": {
28-
"url": "https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases",
29-
"jsonpath": "$[?(@.tag_name =~ /^jbr-release-17\\./)].tag_name",
28+
"script": [
29+
"$url = 'https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases'",
30+
"$releases = Invoke-RestMethod $url",
31+
"$tags = $releases | ForEach-Object { $_.tag_name }",
32+
"# `$Script:expected_ver` is current version for fallback",
33+
"$tags += 'jbr-release-' + ($Script:expected_ver -replace '-', '')",
34+
"$pattern = 'jbr-release-17\\.(?<Version>[\\d.]+)b(?<BuildNum>[\\d]+)\\.(?<Patch>\\d+)'",
35+
"$matches = foreach ($t in $tags) { if ($t -match $pattern) {",
36+
" [PSCustomObject]@{",
37+
" Tag = $t",
38+
" VersionParts = ($Matches.Version -split '\\.') | ForEach-Object { [int]$_ }",
39+
" BuildNum = [int]$Matches.BuildNum",
40+
" Patch = [int]$Matches.Patch",
41+
" }",
42+
" } }",
43+
"$latest = $matches | Sort-Object @{Expression={$_.VersionParts[0]}},",
44+
" @{Expression={$_.VersionParts[1]}},",
45+
" @{Expression={$_.BuildNum}},",
46+
" @{Expression={$_.Patch}} | Select-Object -Last 1",
47+
"Write-Output $latest.Tag"
48+
],
3049
"regex": "jbr-release-17\\.(?<Version>[\\d.]+)(?<Build>[\\w]+)\\.(?<Patch>[\\d]+)",
3150
"replace": "17.${Version}-${Build}.${Patch}"
3251
},

bucket/intellij-jbr17.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,27 @@
2525
},
2626
"env_add_path": "bin",
2727
"checkver": {
28-
"url": "https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases",
29-
"jsonpath": "$[?(@.tag_name =~ /^jbr-release-17\\./)].tag_name",
28+
"script": [
29+
"$url = 'https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases'",
30+
"$releases = Invoke-RestMethod $url",
31+
"$tags = $releases | ForEach-Object { $_.tag_name }",
32+
"# `$Script:expected_ver` is current version for fallback",
33+
"$tags += 'jbr-release-' + ($Script:expected_ver -replace '-', '')",
34+
"$pattern = 'jbr-release-17\\.(?<Version>[\\d.]+)b(?<BuildNum>[\\d]+)\\.(?<Patch>\\d+)'",
35+
"$matches = foreach ($t in $tags) { if ($t -match $pattern) {",
36+
" [PSCustomObject]@{",
37+
" Tag = $t",
38+
" VersionParts = ($Matches.Version -split '\\.') | ForEach-Object { [int]$_ }",
39+
" BuildNum = [int]$Matches.BuildNum",
40+
" Patch = [int]$Matches.Patch",
41+
" }",
42+
" } }",
43+
"$latest = $matches | Sort-Object @{Expression={$_.VersionParts[0]}},",
44+
" @{Expression={$_.VersionParts[1]}},",
45+
" @{Expression={$_.BuildNum}},",
46+
" @{Expression={$_.Patch}} | Select-Object -Last 1",
47+
"Write-Output $latest.Tag"
48+
],
3049
"regex": "jbr-release-17\\.(?<Version>[\\d.]+)(?<Build>[\\w]+)\\.(?<Patch>[\\d]+)",
3150
"replace": "17.${Version}-${Build}.${Patch}"
3251
},

bucket/intellij-jbr21-jcef.json

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
11
{
2-
"version": "21.0.7-b1038.58",
2+
"version": "21.0.8-b1038.68",
33
"homepage": "https://github.com/JetBrains/JetBrainsRuntime",
44
"description": "A fork of OpenJDK that includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes. These are mainly for running IntelliJ Platform-based products",
55
"license": "GPL-2.0",
66
"architecture": {
77
"64bit": {
8-
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbr_jcef-21.0.7-windows-x64-b1038.58.tar.gz",
9-
"hash": "sha512:00b2aa07632939baa0b44347a57233b0ea4f8b6a1c078c54df2a1398a0ce8e9bef718de7402cd20a94a7e1e11952d9c617f0f85b92a9d89c43e1b1aef8773068",
10-
"extract_dir": "jbr_jcef-21.0.7-windows-x64-b1038.58"
8+
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbr_jcef-21.0.8-windows-x64-b1038.68.tar.gz",
9+
"hash": "sha512:606208a9132370f30d78decc4ea9da5f0f79ae84ede5de447ac1718fa4af81da2015c786822fd2422589cbc6549180659f29f21aec90f61ee48ef18e98ff6d35",
10+
"extract_dir": "jbr_jcef-21.0.8-windows-x64-b1038.68"
1111
},
1212
"arm64": {
13-
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbr_jcef-21.0.7-windows-aarch64-b1038.58.tar.gz",
14-
"hash": "sha512:99440f2e86d697b8aea1d089f9fc81fd93d8913e994d19b4400c75e747b994c3153ff313f6809e2833ad908930fc97b1d38ecd5fe8684af379ce601c42f680a4",
15-
"extract_dir": "jbr_jcef-21.0.7-windows-aarch64-b1038.58"
13+
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbr_jcef-21.0.8-windows-aarch64-b1038.68.tar.gz",
14+
"hash": "sha512:b6430cc3c8dbd3c3f71e2cb24d048a276e6f5fe03950a0a971b694a6525a68c43e7e72a5bb6992ed2cd4609f31e5e8cc4b119625e081a5233f17036da96f54e0",
15+
"extract_dir": "jbr_jcef-21.0.8-windows-aarch64-b1038.68"
1616
}
1717
},
1818
"env_set": {
1919
"JAVA_HOME": "$dir"
2020
},
2121
"env_add_path": "bin",
2222
"checkver": {
23-
"url": "https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases",
24-
"jsonpath": "$[?(@.tag_name =~ /^jbr-release-21\\./)].tag_name",
23+
"script": [
24+
"$url = 'https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases'",
25+
"$releases = Invoke-RestMethod $url",
26+
"$tags = $releases | ForEach-Object { $_.tag_name }",
27+
"# `$Script:expected_ver` is current version for fallback",
28+
"$tags += 'jbr-release-' + ($Script:expected_ver -replace '-', '')",
29+
"$pattern = 'jbr-release-21\\.(?<Version>[\\d.]+)b(?<BuildNum>[\\d]+)\\.(?<Patch>\\d+)'",
30+
"$matches = foreach ($t in $tags) { if ($t -match $pattern) {",
31+
" [PSCustomObject]@{",
32+
" Tag = $t",
33+
" VersionParts = ($Matches.Version -split '\\.') | ForEach-Object { [int]$_ }",
34+
" BuildNum = [int]$Matches.BuildNum",
35+
" Patch = [int]$Matches.Patch",
36+
" }",
37+
" } }",
38+
"$latest = $matches | Sort-Object @{Expression={$_.VersionParts[0]}},",
39+
" @{Expression={$_.VersionParts[1]}},",
40+
" @{Expression={$_.BuildNum}},",
41+
" @{Expression={$_.Patch}} | Select-Object -Last 1",
42+
"Write-Output $latest.Tag"
43+
],
2544
"regex": "jbr-release-21\\.(?<Version>[\\d.]+)(?<Build>[\\w]+)\\.(?<Patch>[\\d]+)",
2645
"replace": "21.${Version}-${Build}.${Patch}"
2746
},

bucket/intellij-jbr21-sdk-jcef.json

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
11
{
2-
"version": "21.0.7-b1038.58",
2+
"version": "21.0.8-b1038.68",
33
"homepage": "https://github.com/JetBrains/JetBrainsRuntime",
44
"description": "A fork of OpenJDK that includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes. These are mainly for running IntelliJ Platform-based products",
55
"license": "GPL-2.0",
66
"architecture": {
77
"64bit": {
8-
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.7-windows-x64-b1038.58.tar.gz",
9-
"hash": "sha512:60c3d40b9a7c22a5ded1fcd9d81b673dc515d73c8cd9dc8e9798f4d68f380f22b514c141b4beb087c4ebfa78e3a522c8a2e5ef816a943f96351d93830c1b6f64",
10-
"extract_dir": "jbrsdk_jcef-21.0.7-windows-x64-b1038.58"
8+
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.8-windows-x64-b1038.68.tar.gz",
9+
"hash": "sha512:b6a6f72cb16512a47d981d4ccd71eed87c72eca7ef85b1d3cb26249af1250815a85def0669beba54a16f273111fe5252809dd2d4c12a40e51e4e772d81303ad3",
10+
"extract_dir": "jbrsdk_jcef-21.0.8-windows-x64-b1038.68"
1111
},
1212
"arm64": {
13-
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.7-windows-aarch64-b1038.58.tar.gz",
14-
"hash": "sha512:892bdfa4baebf59c50691908e281ec5e0f22b0c2caf4fbd464b0677b3263ec558cbc842e4a252cb3da796dbdd424de6ba92ee4977af449dbff6a094ee93b03fa",
15-
"extract_dir": "jbrsdk_jcef-21.0.7-windows-aarch64-b1038.58"
13+
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.8-windows-aarch64-b1038.68.tar.gz",
14+
"hash": "sha512:3fcfe22a6e619abfb5ec2540a9098afb891b5d1727b1b8414df0b26ef16ff88368e173f447e9af679e57e8f5f0dfa9d301b5f193c1abaf9535a8effc2103ae1f",
15+
"extract_dir": "jbrsdk_jcef-21.0.8-windows-aarch64-b1038.68"
1616
}
1717
},
1818
"env_set": {
1919
"JAVA_HOME": "$dir"
2020
},
2121
"env_add_path": "bin",
2222
"checkver": {
23-
"url": "https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases",
24-
"jsonpath": "$[?(@.tag_name =~ /^jbr-release-21\\./)].tag_name",
23+
"script": [
24+
"$url = 'https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases'",
25+
"$releases = Invoke-RestMethod $url",
26+
"$tags = $releases | ForEach-Object { $_.tag_name }",
27+
"# `$Script:expected_ver` is current version for fallback",
28+
"$tags += 'jbr-release-' + ($Script:expected_ver -replace '-', '')",
29+
"$pattern = 'jbr-release-21\\.(?<Version>[\\d.]+)b(?<BuildNum>[\\d]+)\\.(?<Patch>\\d+)'",
30+
"$matches = foreach ($t in $tags) { if ($t -match $pattern) {",
31+
" [PSCustomObject]@{",
32+
" Tag = $t",
33+
" VersionParts = ($Matches.Version -split '\\.') | ForEach-Object { [int]$_ }",
34+
" BuildNum = [int]$Matches.BuildNum",
35+
" Patch = [int]$Matches.Patch",
36+
" }",
37+
" } }",
38+
"$latest = $matches | Sort-Object @{Expression={$_.VersionParts[0]}},",
39+
" @{Expression={$_.VersionParts[1]}},",
40+
" @{Expression={$_.BuildNum}},",
41+
" @{Expression={$_.Patch}} | Select-Object -Last 1",
42+
"Write-Output $latest.Tag"
43+
],
2544
"regex": "jbr-release-21\\.(?<Version>[\\d.]+)(?<Build>[\\w]+)\\.(?<Patch>[\\d]+)",
2645
"replace": "21.${Version}-${Build}.${Patch}"
2746
},

bucket/intellij-jbr21-sdk.json

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,51 @@
11
{
2-
"version": "21.0.7-b1038.58",
2+
"version": "21.0.8-b1038.68",
33
"homepage": "https://github.com/JetBrains/JetBrainsRuntime",
44
"description": "A fork of OpenJDK that includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes. These are mainly for running IntelliJ Platform-based products",
55
"license": "GPL-2.0",
66
"architecture": {
77
"32bit": {
8-
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.7-windows-x86-b1038.58.tar.gz",
9-
"hash": "sha512:39f890e3de7fefeed63293ce9a8a8b4e1e4c81f549eb94ba33855a000926e3ea950b3d83b4723263c3557f767ae350e4d4ff88ebdaf104d735639d73f3fb8012",
10-
"extract_dir": "jbrsdk-21.0.7-windows-x86-b1038.58"
8+
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.8-windows-x86-b1038.68.tar.gz",
9+
"hash": "sha512:d9ced851e1d52e2122121afe3ec08c7010d2c7924832392e1da7e474b891d80edf0a6913bf4ff92a00652b44fc11658bfb9d44d39371a4a5a48ce9860cb06f7e",
10+
"extract_dir": "jbrsdk-21.0.8-windows-x86-b1038.68"
1111
},
1212
"64bit": {
13-
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.7-windows-x64-b1038.58.tar.gz",
14-
"hash": "sha512:0dc935ebfd61682b5d641fe4794a9f87b858ae51475bdf8eb1980fadc5da2b3aac502cb9bd4de571ea22c71b62b5bf7028fadfd5594746f3f34c3e6aa30bd1de",
15-
"extract_dir": "jbrsdk-21.0.7-windows-x64-b1038.58"
13+
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.8-windows-x64-b1038.68.tar.gz",
14+
"hash": "sha512:b197aa242e3d8d0d0697f6c213f553b2836349a8f46682882763b0ad4d7def7a303c61bc25aa6b1585650f3f02acf0ddb46600a1e5f3c1429af5efa24c65bb17",
15+
"extract_dir": "jbrsdk-21.0.8-windows-x64-b1038.68"
1616
},
1717
"arm64": {
18-
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.7-windows-aarch64-b1038.58.tar.gz",
19-
"hash": "sha512:1ce926a18bfc88416fb66c7ed1edaea277766224a55f8de860ff00bae875e5a980466d71904d83d3589b49c0aefcb73c75a9e7ccc3a73a187268762597b358cf",
20-
"extract_dir": "jbrsdk-21.0.7-windows-aarch64-b1038.58"
18+
"url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.8-windows-aarch64-b1038.68.tar.gz",
19+
"hash": "sha512:c81b2f261883359dc39fb9ebbff0b757f50a24cecb9c6a7f7f2271593b128d1019e94655b77d843538f6019a08719ea55727532314a78837f8e7e43def3ca639",
20+
"extract_dir": "jbrsdk-21.0.8-windows-aarch64-b1038.68"
2121
}
2222
},
2323
"env_set": {
2424
"JAVA_HOME": "$dir"
2525
},
2626
"env_add_path": "bin",
2727
"checkver": {
28-
"url": "https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases",
29-
"jsonpath": "$[?(@.tag_name =~ /^jbr-release-21\\./)].tag_name",
28+
"script": [
29+
"$url = 'https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases'",
30+
"$releases = Invoke-RestMethod $url",
31+
"$tags = $releases | ForEach-Object { $_.tag_name }",
32+
"# `$Script:expected_ver` is current version for fallback",
33+
"$tags += 'jbr-release-' + ($Script:expected_ver -replace '-', '')",
34+
"$pattern = 'jbr-release-21\\.(?<Version>[\\d.]+)b(?<BuildNum>[\\d]+)\\.(?<Patch>\\d+)'",
35+
"$matches = foreach ($t in $tags) { if ($t -match $pattern) {",
36+
" [PSCustomObject]@{",
37+
" Tag = $t",
38+
" VersionParts = ($Matches.Version -split '\\.') | ForEach-Object { [int]$_ }",
39+
" BuildNum = [int]$Matches.BuildNum",
40+
" Patch = [int]$Matches.Patch",
41+
" }",
42+
" } }",
43+
"$latest = $matches | Sort-Object @{Expression={$_.VersionParts[0]}},",
44+
" @{Expression={$_.VersionParts[1]}},",
45+
" @{Expression={$_.BuildNum}},",
46+
" @{Expression={$_.Patch}} | Select-Object -Last 1",
47+
"Write-Output $latest.Tag"
48+
],
3049
"regex": "jbr-release-21\\.(?<Version>[\\d.]+)(?<Build>[\\w]+)\\.(?<Patch>[\\d]+)",
3150
"replace": "21.${Version}-${Build}.${Patch}"
3251
},

0 commit comments

Comments
 (0)