improve: better version control

This commit is contained in:
h z
2025-02-18 21:22:47 +00:00
parent 1118999b6d
commit 46999d7434
4 changed files with 62 additions and 36 deletions

9
.idea/Polonium.Workspace.iml generated Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

40
Polonium.Wrokspace.sln Normal file
View File

@@ -0,0 +1,40 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polonium.Tasks", "..\Polonium.Tasks\Polonium.Tasks.csproj", "{44E939E7-53BA-456E-A58F-677A15F313FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polonium.Sdk", "..\Polonium.Sdk\Polonium.Sdk.csproj", "{5D8D4D5D-B048-4CA4-8F46-421BD30516AB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polonium", "..\Polonium\Polonium.csproj", "{1A022180-2EB2-48A2-BCBD-D7C6C2995E5D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polonium.Generators", "..\Polonium.Generators\Polonium.Generators.csproj", "{8DB78761-47BF-433A-A53F-E14DBAE4E06F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polonium.Test", "Polonium.Test\Polonium.Test.csproj", "{E4EE6A9D-6D64-4180-84BE-C186D8D5A55F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{44E939E7-53BA-456E-A58F-677A15F313FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44E939E7-53BA-456E-A58F-677A15F313FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44E939E7-53BA-456E-A58F-677A15F313FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44E939E7-53BA-456E-A58F-677A15F313FB}.Release|Any CPU.Build.0 = Release|Any CPU
{5D8D4D5D-B048-4CA4-8F46-421BD30516AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D8D4D5D-B048-4CA4-8F46-421BD30516AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D8D4D5D-B048-4CA4-8F46-421BD30516AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D8D4D5D-B048-4CA4-8F46-421BD30516AB}.Release|Any CPU.Build.0 = Release|Any CPU
{1A022180-2EB2-48A2-BCBD-D7C6C2995E5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A022180-2EB2-48A2-BCBD-D7C6C2995E5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A022180-2EB2-48A2-BCBD-D7C6C2995E5D}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{1A022180-2EB2-48A2-BCBD-D7C6C2995E5D}.Release|Any CPU.Build.0 = Debug|Any CPU
{8DB78761-47BF-433A-A53F-E14DBAE4E06F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DB78761-47BF-433A-A53F-E14DBAE4E06F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DB78761-47BF-433A-A53F-E14DBAE4E06F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DB78761-47BF-433A-A53F-E14DBAE4E06F}.Release|Any CPU.Build.0 = Release|Any CPU
{E4EE6A9D-6D64-4180-84BE-C186D8D5A55F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4EE6A9D-6D64-4180-84BE-C186D8D5A55F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4EE6A9D-6D64-4180-84BE-C186D8D5A55F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4EE6A9D-6D64-4180-84BE-C186D8D5A55F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@@ -1,9 +1,9 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GodotSdkVersion>4.4.0-beta.3</GodotSdkVersion>
<PoloniumVersion>0.1.1-x</PoloniumVersion>
<PoloniumTasksVersion>0.1.1-x</PoloniumTasksVersion>
<PoloniumGeneratorsVersion>0.1.1-x</PoloniumGeneratorsVersion>
<PoloniumSdkVersion>0.0.1</PoloniumSdkVersion>
<PoloniumVersion>0.1.2</PoloniumVersion>
<PoloniumTasksVersion>0.1.2</PoloniumTasksVersion>
<PoloniumGeneratorsVersion>0.1.2</PoloniumGeneratorsVersion>
<PoloniumSdkVersion>0.0.2</PoloniumSdkVersion>
</PropertyGroup>
</Project>

41
run
View File

@@ -1,39 +1,16 @@
#!/bin/bash
set -e
PoloniumPath="./Polonium/"
PoloniumTasksPath="./Polonium.Tasks/"
PoloniumGeneratorsPath="./Polonium.Generators/"
PoloniumSdkPath="./Polonium.Sdk/"
VersionInfo="./VersionInfo.props"
RepoBase="https://git.hangman-lab.top/hzhang/"
Repos=("Polonium" "Polonium.Tasks" "Polonium.Generators" "Polonium.Sdk")
for repo in "${Repos[@]}"; do
if [ -d "./$repo/.git" ]; then
git -C "./$repo" pull
else
git clone "$RepoBase$repo.git"
fi
done
rm -f "${PoloniumPath}Package/build/VersionInfo.props"
rm -f "${PoloniumTasksPath}Package/build/VersionInfo.props"
rm -f "${PoloniumGeneratorsPath}VersionInfo.props"
rm -f "${PoloniumSdkPath}Sdk/VersionInfo.props"
cp "$VersionInfo" "${PoloniumPath}Package/build/VersionInfo.props"
cp "$VersionInfo" "${PoloniumTasksPath}Package/build/VersionInfo.props"
cp "$VersionInfo" "${PoloniumGeneratorsPath}VersionInfo.props"
cp "$VersionInfo" "${PoloniumSdkPath}Sdk/VersionInfo.props"
Projects=("Polonium.Tasks" "Polonium" "Polonium.Generators" "Polonium.Sdk")
rm -rf ~/.nuget/packages/polonium*
for repo in "${Repos[@]}"; do
dotnet clean "./$repo/$repo.csproj"
dotnet restore "./$repo/$repo.csproj"
dotnet build "./$repo/$repo.csproj"
chmod +x "./$repo/publish"
bash "./$repo/publish"
for proj in "${Projects[@]}"; do
cp -f "./VersionInfo.props" "../$proj/VersionInfo.props"
dotnet clean "../$proj/$proj.csproj"
dotnet restore "../$proj/$proj.csproj"
dotnet build "../$proj/$proj.csproj"
chmod +x "../$proj/publish"
bash "../$proj/publish"
done