16 lines
461 B
Python
16 lines
461 B
Python
import requests
|
|
import re
|
|
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 = version.split('.')
|
|
w[-1] = str(int(w[-1]) + 1)
|
|
version = '.'.join(w)
|
|
w = open("Skeleton.csproj", "r").read()
|
|
h = re.sub(r'<Version>.*</Version>',r'<Version>'+version+'</Version>',w)
|
|
with open("Skeleton.csproj", "w") as f:
|
|
f.write(h) |