version auto upgrade
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>0.0.1</Version>
|
<Version>0.0.2</Version>
|
||||||
<Description> </Description>
|
<Description> </Description>
|
||||||
<Copyright>hzhang</Copyright>
|
<Copyright>hzhang</Copyright>
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
|||||||
16
version_upgrade.py
Normal file
16
version_upgrade.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
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)
|
||||||
Reference in New Issue
Block a user