CI CD Fix

This commit is contained in:
h z
2024-06-23 05:03:15 +08:00
parent 2153e4bc9b
commit 8fadd39ec3
2 changed files with 25 additions and 0 deletions

5
DependencyFix.sh Normal file
View File

@@ -0,0 +1,5 @@
sed -i '/^Project.*"Skeleton".*/d' ./VirtualChemistryTest.sln
sed -i '/^EndProject$/d' ./VirtualChemistryTest.sln
sed -i '/^Project.*/aEndProject' ./VirtualChemistryTest.sln
sed -i '/.*ProjectReference.*/d' ./VirtualChemistryTest.csproj

20
nuget_update.py Normal file
View File

@@ -0,0 +1,20 @@
import requests
r = requests.get('http://127.0.0.1:3000/api/packages/hzhang/nuget/query')
res = r.text
d = eval(res)
skVersion = ""
vcVersion = ""
for x in d['data']:
if x['id'] == 'VirtualChemistry':
vcVersion = x['version']
if x['id'] == 'Skeleton':
skVersion = x['version']
w = open('VirtualChemistryTest.csproj', 'r').read()
s = w.split('<ItemGroup>')
s[1] = '\n<PackageReference Include="VirtualChemistry" Version="'+vcVersion+'"/>\n' + s[1]
s[1] = '\n<PackageReference Include="Skeleton" Version="'+skVersion+'"/>\n' + s[1]
w = '<ItemGroup>'.join(s)
print(w)
with open('VirtualChemistryTest.csproj', 'w') as f:
f.write(w)