Skip to content

Commit

Permalink
Override assembly version attributes in pack.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Karsten Nikolai Strand committed May 3, 2018
1 parent 234649a commit 4e257e5
Show file tree
Hide file tree
Showing 43 changed files with 63 additions and 120 deletions.
12 changes: 12 additions & 0 deletions scripts/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ if [ -n "$SUFFIX" ]; then
VERSION="$VERSION-$SUFFIX"
fi

# Extract the X.Y.Z part of version, removing the suffix if any
VERSION_TRIPLET=`echo $VERSION | sed -n -e 's/\([^-]*\).*/\1/p'`

# Start with updating the local GlobalAssemblyInfo.Override.cs
sed -e 's/\(AssemblyVersion("\)[^"]*\(")\)/\1'$VERSION_TRIPLET'\2/' \
-e 's/\(AssemblyFileVersion("\)[^"]*\(")\)/\1'$VERSION_TRIPLET'\2/' \
-e 's/\(AssemblyInformationalVersion("\)[^"]*\(")\)/\1'$VERSION'\2/' \
src/GlobalAssemblyInfo.cs > src/GlobalAssemblyInfo.Override.cs

# Build
if [ "$1" != --no-build ]; then
bash scripts/build.sh --release; echo ""
Expand Down Expand Up @@ -95,3 +104,6 @@ for f in Library/Core/*; do
$SUFFIX_OPT
fi
done

# Remove GlobalAssemblyInfo Override
rm -f src/GlobalAssemblyInfo.Override.cs
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GlobalAssemblyInfo.Override.cs
10 changes: 10 additions & 0 deletions src/GlobalAssemblyInfo.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project ToolsVersion="14.0" DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Condition="!Exists('$(MSBuildThisFileDirectory)\GlobalAssemblyInfo.Override.cs')" Include="$(MSBuildThisFileDirectory)\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Condition="Exists('$(MSBuildThisFileDirectory)\GlobalAssemblyInfo.Override.cs')" Include="$(MSBuildThisFileDirectory)\GlobalAssemblyInfo.Override.cs">
<Link>Properties\GlobalAssemblyInfo.Override.cs</Link>
</Compile>
</ItemGroup>
</Project>
4 changes: 1 addition & 3 deletions src/common/Uno.Common/Uno.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@
<Reference Include="System.Core" />
<Reference Include="System.Management" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="CLI\Arguments.cs" />
<Compile Include="CLI\Command.cs" />
<Compile Include="CLI\DotNetCommand.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/compiler/Uno.Compiler.API/Uno.Compiler.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Backends\BackendExtension.cs" />
<Compile Include="Backends\Shaders\ShaderPass.cs" />
<Compile Include="CompilerFactory.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="AppLoader.cs" />
<Compile Include="CilBackend.cs" />
<Compile Include="CilGenerator.Generate.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="CallFlags.cs" />
<Compile Include="CppBackend.cs" />
<Compile Include="CppFinallyTransform.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="CsBackend.cs" />
<Compile Include="CsWriter.cs" />
<Compile Include="CsBackend.GenerateProject.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="JsBackend.cs" />
<Compile Include="JsHelper.cs" />
<Compile Include="JsObfuscator.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="GlslWriter.cs" />
<Compile Include="GLBackend.cs" />
<Compile Include="GLGenerator.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="PInvokeDecompiler.cs" />
<Compile Include="PInvokeBackend.cs" />
<Compile Include="PInvokeWriter.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Builders\AttachedMemberCache.cs" />
<Compile Include="Builders\AttachedUxEvent.cs" />
<Compile Include="Builders\AttachedUxEventEqualityComparer.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/compiler/Uno.Compiler.Core/Uno.Compiler.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Compiler.cs" />
<Compile Include="BuildEnvironment.cs" />
<Compile Include="CompilerOptions.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="CppExtension.cs" />
<Compile Include="Foreign\ForeignCPlusPlusPass.cs" />
<Compile Include="Foreign\ForeignFilePass.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Analysis\Associativity.cs" />
<Compile Include="Analysis\MessageType.cs" />
<Compile Include="Analysis\Precedence.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/disasm/Uno.Disasm-WPF/Uno.Disasm-WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="TreeState.cs" />
<Page Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
Expand Down
4 changes: 1 addition & 3 deletions src/disasm/Uno.Disasm/Uno.Disasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Disassemblers\BytecodeDisassembler.cs" />
<Compile Include="Disassembler.cs" />
<Compile Include="Disassemblers\UnoDisassembler.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/engine/Uno.Build.Targets/Uno.Build.Targets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@
<HintPath>..\..\..\packages\FuseOpen.Xamarin.Mac.3.4.0.2\lib\net45\Xamarin.Mac.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Android\AndroidBuild.cs" />
<Compile Include="Android\AndroidGenerator.cs" />
<Compile Include="Browser\WebServer.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/engine/Uno.Build/Uno.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="BuildConfiguration.cs" />
<Compile Include="BuildDriver.cs" />
<Compile Include="BuildFile.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/engine/Uno.Configuration/Uno.Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="UnoConfigFile.cs" />
<Compile Include="UnoConfig.cs" />
<Compile Include="UnoConfigString.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/engine/Uno.ProjectFormat/Uno.ProjectFormat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="GlobList.cs" />
<Compile Include="IncludeGlobber.cs" />
<Compile Include="IncludeItem.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/engine/Uno.Stuff/Uno.Stuff.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Arguments.cs" />
<Compile Include="Commands\Clean.cs" />
<Compile Include="Commands\GC.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/main/Uno.CLI.Loader/Uno.CLI.Loader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Program.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 1 addition & 3 deletions src/main/Uno.CLI.Main/Uno.CLI.Main.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Program.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 1 addition & 3 deletions src/main/Uno.CLI/Uno.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Android\AdbDevice.cs" />
<Compile Include="Android\Android.cs" />
<Compile Include="Android\Adb.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@
<HintPath>..\..\..\packages\FuseOpen.Xamarin.Mac.3.4.0.2\lib\net45\Xamarin.Mac.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="DummyUnoApp.cs" />
<Compile Include="Program.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="Microsoft.Ink" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="DpiAwareness.cs" />
<Compile Include="DummyApp.cs" />
<Compile Include="MainForm.cs">
Expand Down
4 changes: 1 addition & 3 deletions src/runtime/Uno.Runtime.Core/Uno.Runtime.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="OpenGL\GL.cs" />
<Compile Include="OpenGL\GLBlendEquation.cs" />
<Compile Include="OpenGL\GLBlendingFactor.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/runtime/Uno.Support.OpenTK/Uno.Support.OpenTK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="BufferDisposable.cs" />
<Compile Include="TextureDisposable.cs" />
<Compile Include="FramebufferDisposable.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="ErrorItem.cs" />
<Compile Include="ErrorItemComparer.cs" />
<Compile Include="ErrorType.cs" />
Expand Down
4 changes: 1 addition & 3 deletions src/testing/Uno.TestGenerator/Uno.TestGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Options.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\Resources.Designer.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<Import Project="..\..\GlobalAssemblyInfo.targets" />
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Assertion.cs" />
<Compile Include="CommandLineOptions.cs" />
<Compile Include="Test.cs" />
Expand Down
Loading

0 comments on commit 4e257e5

Please sign in to comment.