File tree Expand file tree Collapse file tree 2 files changed +32
-9
lines changed Expand file tree Collapse file tree 2 files changed +32
-9
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,10 @@ jobs:
37
37
run : |
38
38
mkdir ll
39
39
mv .\LICENSE .\ll\LL_Easier_LICENSE
40
- cd .\scripts
41
- Invoke-WebRequest -Uri https://github.com/futrime/lip/releases/latest/download/lip-windows-amd64.zip -Outfile .\lip.zip
42
- Invoke-WebRequest -Uri https://www.7-zip.org/a/7z2401-x64.exe -Outfile .\7z_installer.exe
43
- .\7z_installer.exe
44
- unzip lip.zip
40
+ Invoke-WebRequest -Uri https://github.com/futrime/lip/releases/latest/download/lip-windows-amd64.zip -Outfile .\scripts\lip.zip
41
+ Invoke-WebRequest -Uri https://www.7-zip.org/a/7z2401-x64.exe -Outfile .\scripts\7z_installer.exe
42
+ .\scripts\7z_installer.exe
43
+ unzip .\scripts\lip.zip -d .\scripts\
45
44
"$env:GITHUB_WORKSPACE\scripts" | Out-File -FilePath $env:GITHUB_PATH -Append
46
45
47
46
- name : 🧰 Install LeviLamina
@@ -69,13 +68,14 @@ jobs:
69
68
run : |
70
69
user_scripts.ps1
71
70
72
- - name : 📂 Remove BDS
71
+ - name : 📂 Remove BDS & Get BDS Version
73
72
id : get_bds_core_version
74
73
working-directory : ll
75
74
run : |
76
- $file = Get-ChildItem -Path .\.cache\bdsdown\ -File | Select-Object -First 1
77
- "bds_core_version=$(echo $file.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
78
- Remove-Item -Path $file.FullName
75
+ #$file = Get-ChildItem -Path .\.cache\bdsdown\ -File | Select-Object -First 1
76
+ #"bds_core_version=$(echo $file.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
77
+ #Remove-Item -Path $file.FullName
78
+ "bds_core_version=$(python ..\scripts\get_bds_version.py)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
79
79
rm .\behavior_packs -Force -Recurse
80
80
rm .\definitions -Force -Recurse
81
81
rm .\resource_packs -Force -Recurse
Original file line number Diff line number Diff line change
1
+ import json
2
+ import re
3
+ try :
4
+
5
+ with open (".\\ .lip\\ metadata\\ github.com%2FLiteLDev%2Fbds.json" ) as file :
6
+ json_data = file .read ()
7
+ except FileNotFoundError :
8
+ print ("File not found" )
9
+ raise SystemExit
10
+ except Exception as e :
11
+ print (e )
12
+ raise SystemExit
13
+ data = json .loads (json_data )
14
+
15
+ post_install_command = data ['commands' ]['post_install' ][0 ]
16
+ match = re .search (r'version://windows/([^\\]+)' , post_install_command )
17
+
18
+ if match :
19
+ version_number = match .group (1 )
20
+ print (version_number )
21
+ else :
22
+ print ("???" )
23
+
You can’t perform that action at this time.
0 commit comments