improve: better version control
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="VersionInfo.props" Condition="Exists('VersionInfo.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<RootNamespace>Polonium.Tasks</RootNamespace>
|
<RootNamespace>Polonium.Tasks</RootNamespace>
|
||||||
<AssemblyName>Polonium.Tasks</AssemblyName>
|
<AssemblyName>Polonium.Tasks</AssemblyName>
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
<Version>0.1.1-x</Version>
|
<Version>$(PoloniumTasksVersion)</Version>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
<GenerateDependencyFile>true</GenerateDependencyFile>
|
<GenerateDependencyFile>true</GenerateDependencyFile>
|
||||||
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
|
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
|
||||||
@@ -18,21 +18,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference
|
<PackageReference Include="Microsoft.Build" Version="17.12.6" PrivateAssets="all" />
|
||||||
Include="Microsoft.Build"
|
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.12.6" PrivateAssets="all" />
|
||||||
Version="17.12.6"
|
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.12.0" PrivateAssets="all" />
|
||||||
PrivateAssets="all"
|
|
||||||
/>
|
|
||||||
<PackageReference
|
|
||||||
Include="Microsoft.Build.Tasks.Core"
|
|
||||||
Version="17.12.6"
|
|
||||||
PrivateAssets="all"
|
|
||||||
/>
|
|
||||||
<PackageReference
|
|
||||||
Include="Microsoft.CodeAnalysis"
|
|
||||||
Version="4.12.0"
|
|
||||||
PrivateAssets="all"
|
|
||||||
/>
|
|
||||||
<EmbeddedResource Update="Resources.resx">
|
<EmbeddedResource Update="Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
@@ -44,11 +32,8 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<AdditionalFiles Remove="AnalyzerReleases.Shipped.md" />
|
<AdditionalFiles Remove="AnalyzerReleases.Shipped.md" />
|
||||||
<AdditionalFiles Remove="AnalyzerReleases.Unshipped.md" />
|
<AdditionalFiles Remove="AnalyzerReleases.Unshipped.md" />
|
||||||
<None
|
<None Include="Package/build/**/*" Pack="true" PackagePath="build" />
|
||||||
Include="Package/build/**/*"
|
<None Include="VersionInfo.props" Condition="Exists('VersionInfo.props')" Pack="true" PackagePath="build" />
|
||||||
Pack="true"
|
|
||||||
PackagePath="build"
|
|
||||||
/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
|
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -64,10 +49,10 @@
|
|||||||
Condition="'$(GenerateDependencyFile)' == 'true'"
|
Condition="'$(GenerateDependencyFile)' == 'true'"
|
||||||
>
|
>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BuiltProjectOutputGroupOutput
|
<BuiltProjectOutputGroupOutput
|
||||||
Include="$(ProjectDepsFilePath)"
|
Include="$(ProjectDepsFilePath)"
|
||||||
TargetPath="$(ProjectDepsFileName)"
|
TargetPath="$(ProjectDepsFileName)"
|
||||||
FinalOutputPath="$(ProjectDepsFilePath)"
|
FinalOutputPath="$(ProjectDepsFilePath)"
|
||||||
/>
|
/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|||||||
12
publish
Normal file → Executable file
12
publish
Normal file → Executable file
@@ -1,2 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
dotnet nuget push "$(ls -t ./bin/Debug/Polonium.Tasks.*.nupkg | head -n 1)" --source hangman-lab
|
|
||||||
|
SCRIPT_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")")/
|
||||||
|
LATEST_PACKAGE=$(ls -t "${SCRIPT_DIR}"bin/Debug/Polonium.Tasks.*.nupkg 2>/dev/null | head -n 1)
|
||||||
|
|
||||||
|
if [[ -z "$LATEST_PACKAGE" ]]; then
|
||||||
|
echo "❌ Error: No .nupkg file found in ${SCRIPT_DIR}/bin/Debug/"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "🚀 Pushing NuGet package: $LATEST_PACKAGE"
|
||||||
|
dotnet nuget push "$LATEST_PACKAGE" --source hangman-lab
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user