CI CD config
This commit is contained in:
5
DependencyFix.sh
Normal file
5
DependencyFix.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
sed -i '/^Project.*"Skeleton".*/d' ./VirtualChemistry.sln
|
||||||
|
sed -i '/^EndProject$/d' ./VirtualChemistry.sln
|
||||||
|
sed -i '/^Project.*/aEndProject' ./VirtualChemistry.sln
|
||||||
|
|
||||||
|
sed -i '/.*ProjectReference.*/d' ./VirtualChemistry.csproj
|
||||||
@@ -4,6 +4,12 @@
|
|||||||
<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>
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
|
<DocumentationFile>bin\Debug\net6.0\VirtualChemistry.xml</DocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
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)
|
||||||
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'] == 'VirtualChemistry':
|
||||||
|
version = x['version']
|
||||||
|
w = version.split('.')
|
||||||
|
w[-1] = str(int(w[-1]) + 1)
|
||||||
|
version = '.'.join(w)
|
||||||
|
w = open("VirtualChemistry.csproj", "r").read()
|
||||||
|
h = re.sub(r'<Version>.*</Version>', r'<Version>'+version+'</Version>',w)
|
||||||
|
with open("VirtualChemistry.csproj", "w") as f:
|
||||||
|
f.write(h)
|
||||||
Reference in New Issue
Block a user