mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-04-06 14:21:05 +00:00
Use $(Version) to determine the $(PackageVersion) and use $(PackageVersion) in the $(PackageName) variable
This commit is contained in:
@@ -6,18 +6,20 @@
|
||||
|
||||
<Target Name="CreatePackageProperties" DependsOnTargets="Publish">
|
||||
<PropertyGroup>
|
||||
|
||||
<!-- Use the Version as the PackageVersion, but default to 1.0.0 if an Version has not been set
|
||||
and allow the user to override this. -->
|
||||
<PackageVersion Condition="'$(PackageVersion)' == '' AND '$(Version)' != ''">$(Version)</PackageVersion>
|
||||
<PackageVersion Condition="'$(PackageVersion)' == '' AND '$(Version)' == ''">1.0.0</PackageVersion>
|
||||
|
||||
<PackagePrefix Condition="'$(PackagePrefix)' == ''">$(TargetName)</PackagePrefix>
|
||||
<PackageName Condition="'$(PackageName)' == ''">$(PackagePrefix).$(AssemblyFileVersion).$(RuntimeIdentifier)</PackageName>
|
||||
<PackageName Condition="'$(PackageName)' == ''">$(PackagePrefix).$(PackageVersion).$(RuntimeIdentifier)</PackageName>
|
||||
<IntermediatePackagePath>$(IntermediateOutputPath)$(PackageName)</IntermediatePackagePath>
|
||||
<PackagePath Condition="'$(PackagePath)' == ''">$(TargetDir)$(PackageName)</PackagePath>
|
||||
<CreateUser Condition="'$(CreateUser)' == ''">false</CreateUser>
|
||||
<InstallService Condition="'$(InstallService)' == ''">false</InstallService>
|
||||
<PackageMaintainer Condition="'$(PackageMaintainer)' == ''">Anonymous <noreply@example.com></PackageMaintainer>
|
||||
<PackageDescription Condition="'$(PackageDescription)' == ''">$(PackageName)</PackageDescription>
|
||||
|
||||
<!-- Use the AssemblyFileVersion as the PackageVersion, but default to 1.0.0.0 if an AssemblyFileVersion has not been set. -->
|
||||
<PackageVersion Condition="'$(AssemblyFileVersion)' != ''">$(AssemblyFileVersion)</PackageVersion>
|
||||
<PackageVersion Condition="'$(AssemblyFileVersion)' == ''">1.0.0.0</PackageVersion>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user