Fixed assembly configuration/branch attribute generation.

pull/3276/head
Taloth Saldono 5 years ago
parent f9dc2fb6d5
commit d40f2cb852

@ -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
}

@ -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 -->

Loading…
Cancel
Save