CI CD config
This commit is contained in:
16
nuget_update.py
Normal file
16
nuget_update.py
Normal 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)
|
||||
Reference in New Issue
Block a user