Fixed assembly configuration/branch attribute generation.

This commit is contained in:
Taloth Saldono 2019-08-21 20:18:01 +02:00
parent f9dc2fb6d5
commit d40f2cb852
2 changed files with 10 additions and 1 deletions

View File

@ -47,6 +47,7 @@ UpdateVersionNumber()
BUILD_NUMBER=$verMajorMinorRevision.$verBuild
echo "##teamcity[buildNumber '$BUILD_NUMBER']"
sed -i "s/<AssemblyVersion>[0-9.*]\+<\/AssemblyVersion>/<AssemblyVersion>$BUILD_NUMBER<\/AssemblyVersion>/g" ./src/Directory.Build.props
sed -i "s/<AssemblyConfiguration>[\$()A-Za-z-]\+<\/AssemblyConfiguration>/<AssemblyConfiguration>${BRANCH:-dev}<\/AssemblyConfiguration>/g" ./src/Directory.Build.props
fi
}

View File

@ -48,16 +48,24 @@
<PropertyGroup Condition="'$(SonarrProject)'=='true'">
<Product>Sonarr</Product>
<Company>sonarr.tv</Company>
<Copyright>Copyright 2014-$([System.DateTime]::Now.ToString('yyyy')) sonarr.tv (GNU General Public v3)</Copyright>
<Copyright>Copyright 2010-$([System.DateTime]::Now.ToString('yyyy')) sonarr.tv (GNU General Public v3)</Copyright>
<!-- Should be replaced by CI -->
<AssemblyVersion>10.0.0.*</AssemblyVersion>
<AssemblyConfiguration>$(Configuration)-dev</AssemblyConfiguration>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<Deterministic Condition="$(AssemblyVersion.EndsWith('*'))">False</Deterministic>
</PropertyGroup>
<!-- Set the AssemblyConfiguration attribute for projects -->
<ItemGroup Condition="'$(SonarrProject)'=='true'">
<AssemblyAttribute Include="System.Reflection.AssemblyConfigurationAttribute">
<_Parameter1>$(AssemblyConfiguration)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<PropertyGroup>
<!-- We don't want separate framework directories till we go dotnet core -->