CI CD config

This commit is contained in:
h z
2024-06-23 04:33:03 +08:00
parent 4021da83c3
commit f05d34488d
4 changed files with 43 additions and 0 deletions

16
nuget_update.py Normal file
View File

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