Commit 71940e2c authored by Mikael Lindemann's avatar Mikael Lindemann
Browse files

Use project version which can be overridden by TC.

parent df607020
......@@ -5,6 +5,7 @@
<TargetFramework>net472</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<NuspecFile>Appstract.UmbracoContactNumber.nuspec</NuspecFile>
<NuspecProperties>version=$(Version)</NuspecProperties>
</PropertyGroup>
<ItemGroup>
<None Include="App_Plugins\Appstract.UmbracoContactNumber\package.manifest" />
......@@ -32,23 +33,14 @@
<PropertyGroup>
<PackageIntermediateDirectory>$(BaseIntermediateOutputPath)\package_output\</PackageIntermediateDirectory>
<Namespace>
<Namespace Prefix="nuspec" Uri="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd" />
</Namespace>
</PropertyGroup>
<Target Name="UmbracoPackage" AfterTargets="AfterBuild" Condition=" '$(Configuration)' == 'Release' ">
<MakeDir Directories="$(PackageIntermediateDirectory)" />
<Delete Files="$(PackageIntermediateDirectory)\*" />
<Copy SourceFiles="@(PackageSourceFiles)" DestinationFolder="$(PackageIntermediateDirectory)" />
<XmlPeek XmlInputPath="$(NuspecFile)" Query="/nuspec:package/nuspec:metadata/nuspec:version/text()" Namespaces="$(Namespace)">
<Output TaskParameter="Result" ItemName="version" />
</XmlPeek>
<PropertyGroup>
<NuspecVersion>@(version)</NuspecVersion>
</PropertyGroup>
<XmlPoke XmlInputPath="$(PackageIntermediateDirectory)\package.xml" Value="$(NuspecVersion)" Query="/umbPackage/info/package/version" />
<ZipDirectory SourceDirectory="$(PackageIntermediateDirectory)" DestinationFile="$(BaseOutputPath)$(Configuration)\$(AssemblyName).$(NuspecVersion).zip" Overwrite="true" />
<XmlPoke XmlInputPath="$(PackageIntermediateDirectory)\package.xml" Value="$(Version)" Query="/umbPackage/info/package/version" />
<ZipDirectory SourceDirectory="$(PackageIntermediateDirectory)" DestinationFile="$(BaseOutputPath)$(Configuration)\$(AssemblyName).$(Version).zip" Overwrite="true" />
</Target>
<Target Name="UmbracoPackageClean" AfterTargets="Clean">
......
......@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>Appstract.UmbracoContactNumber</id>
<version>1.0.0-pre-11</version>
<version>$version$</version>
<authors>Appstract Consulting Aps</authors>
<owners>Appstract Consulting Aps</owners>
<projectUrl>https://gitlab.dev.appstract.dk/internal/umbracocontactnumber</projectUrl>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment