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 @@ ...@@ -5,6 +5,7 @@
<TargetFramework>net472</TargetFramework> <TargetFramework>net472</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<NuspecFile>Appstract.UmbracoContactNumber.nuspec</NuspecFile> <NuspecFile>Appstract.UmbracoContactNumber.nuspec</NuspecFile>
<NuspecProperties>version=$(Version)</NuspecProperties>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Include="App_Plugins\Appstract.UmbracoContactNumber\package.manifest" /> <None Include="App_Plugins\Appstract.UmbracoContactNumber\package.manifest" />
...@@ -32,23 +33,14 @@ ...@@ -32,23 +33,14 @@
<PropertyGroup> <PropertyGroup>
<PackageIntermediateDirectory>$(BaseIntermediateOutputPath)\package_output\</PackageIntermediateDirectory> <PackageIntermediateDirectory>$(BaseIntermediateOutputPath)\package_output\</PackageIntermediateDirectory>
<Namespace>
<Namespace Prefix="nuspec" Uri="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd" />
</Namespace>
</PropertyGroup> </PropertyGroup>
<Target Name="UmbracoPackage" AfterTargets="AfterBuild" Condition=" '$(Configuration)' == 'Release' "> <Target Name="UmbracoPackage" AfterTargets="AfterBuild" Condition=" '$(Configuration)' == 'Release' ">
<MakeDir Directories="$(PackageIntermediateDirectory)" /> <MakeDir Directories="$(PackageIntermediateDirectory)" />
<Delete Files="$(PackageIntermediateDirectory)\*" /> <Delete Files="$(PackageIntermediateDirectory)\*" />
<Copy SourceFiles="@(PackageSourceFiles)" DestinationFolder="$(PackageIntermediateDirectory)" /> <Copy SourceFiles="@(PackageSourceFiles)" DestinationFolder="$(PackageIntermediateDirectory)" />
<XmlPeek XmlInputPath="$(NuspecFile)" Query="/nuspec:package/nuspec:metadata/nuspec:version/text()" Namespaces="$(Namespace)"> <XmlPoke XmlInputPath="$(PackageIntermediateDirectory)\package.xml" Value="$(Version)" Query="/umbPackage/info/package/version" />
<Output TaskParameter="Result" ItemName="version" /> <ZipDirectory SourceDirectory="$(PackageIntermediateDirectory)" DestinationFile="$(BaseOutputPath)$(Configuration)\$(AssemblyName).$(Version).zip" Overwrite="true" />
</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" />
</Target> </Target>
<Target Name="UmbracoPackageClean" AfterTargets="Clean"> <Target Name="UmbracoPackageClean" AfterTargets="Clean">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata> <metadata>
<id>Appstract.UmbracoContactNumber</id> <id>Appstract.UmbracoContactNumber</id>
<version>1.0.0-pre-11</version> <version>$version$</version>
<authors>Appstract Consulting Aps</authors> <authors>Appstract Consulting Aps</authors>
<owners>Appstract Consulting Aps</owners> <owners>Appstract Consulting Aps</owners>
<projectUrl>https://gitlab.dev.appstract.dk/internal/umbracocontactnumber</projectUrl> <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