Skip to content

Commit

Permalink
Merge pull request #69 from KevM/strong-naming
Browse files Browse the repository at this point in the history
Strong naming and Version 1.14 upgrade
  • Loading branch information
KevM authored Dec 8, 2016
2 parents 4e82064 + 4b9408c commit 5c5f92f
Show file tree
Hide file tree
Showing 9 changed files with 1,306 additions and 244 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ build
SolutionInfo.cs
.paket/paket.exe
paket-files
*.snk
5 changes: 5 additions & 0 deletions Release-Notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.14

- Tika updated to 1.14. Please see the official Tika site for [what's changed](https://dist.apache.org/repos/dist/release/tika/CHANGES-1.14.txt).
- Please note that TikaOnDotnet assemblies are now signed. Thank you [@Sicos1977](https://github.com/Sicos1977) for the PR.

## 1.13.1

- Update TextExtractor dependency metadata to properly sync with TikaOnDotNet
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
version: 1.0.{build}
environment:
snk:
secure: K+FJ6oBTI+HLJhAiHeQN+Ryofta7b8xBrFYq8UJSXyhLyLGPCqcEseUUbs5emkSXV+EfiPGtTngYlafMXynFulhra5MDfWm8r37Go7WOPaDmxH7nvxnarBs/mIFuxOWzxiAlyfDbmzYagGlEoqeWpcMdGGIz1rrqPm9EIS0RNQ5rymfXIQzit7tEaRprHSEN9Jl0gua48BXKFi+s7gRmsNbbCrLshxybXfjcMz+jcaw7U+rtcHD4RjNf9NVqIXPnSseAZxLWZgvYqksJ44T7Nsn6GNSEap1TGReGls8xkwAxPVpPvrq6NSTiJsGU501YU8Vhy2LXFyVUg0H0QMol2YDRfvIiVIhO/mGbtkech/qM1zUpK47n/n2H4Ivy+KGZ+S301qhacKLY5Ts1Mn4OUaPBOWsgAn/s2dSz/lTlYU0lEdiaJg6G06j4jghnvip3PsW/CPG77yMidSN07itMB2m8V7e8idNpoQajDDtz7Xch/1CUMzfiFiS1E6TA/xJXbFOvq3fLthYe2mXpZG5Zuk72bop2eBpvOQaSu9qsSBASVO8j4Ekrr1P59B6IWE/1kcD4XI7sT+hUBD9kpJgoGoUyVS/xWuiDdTuaO1FfBIVI6VEYv+6W1f8Sa6E+lnuzq691l7gmlguf0os+uIqQ7YAtXyrB3jYJJMZOHgsDHMGh4g89MmTsS/qxgaYQoGGAx3GeDX0g+GUDsJMGwXb1xcCphHlOY5uzyk8Yw5t+sVoKgSOEumRc2bIBkRx8dKmZx/50pl75Mdvtpdf4Kb374ryefGaeAGFBTfbuy0CWxML6G8Kj4JM7HmzmBuYMA6UJ3Spnnjrems9lIMgZShqTFH6kiL4XYMUwTUoNyT7acPER0owryawF+Df2h1uxkD7gzGQZMAdLRJ4mQQx+ALd8sk7dMrYS+W08j3R3zXU4pj9jdYt1CJiaO6m0x2dUOiwXXkyGp6dvR0oHCBGDT08DrbsSfZ+bd4viiFKNl1ciDHgU4PiXJ8a+z2GwTIsBqK+vfDyXNtcU6LdeM+PbdqGqAHcZMjV81xHJoFfgGFdrvc8Cmh/0N3SCCBTSo5TX3S+d
nugetkey:
secure: JNpnpSglMOIdpmkuqgvwvY6jzqEabYZH1hRziq/GddbsMNWyObRk07km0SZYBfT1
build_script:
Expand Down
32 changes: 28 additions & 4 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ let tempDir = "temp"
let tikaLibDir = "lib"

let solutionFile = "src/TikaOnDotNet.sln"
let keyFile = (fileInfo "TikaOnDotNet.snk")

let [<Literal>]rootPath = __SOURCE_DIRECTORY__
let testAssemblies = "src/**/bin/Release/*Tests*.dll"
type root = FileSystem<rootPath>
Expand Down Expand Up @@ -54,10 +56,13 @@ let IKVMCompile workingDirectory tasks =
let rec compile (task:IKVMcTask) =
let getIKVMCommandLineArgs() =
let sb = Text.StringBuilder()
bprintf sb "-target:library -assembly:%s"
(task.AssemblyName)

if keyFile.Exists
then bprintf sb "-keyfile:%s -target:library -assembly:%s" keyFile.FullName task.AssemblyName

if not <| String.IsNullOrEmpty(task.Version)
then task.Version |> bprintf sb " -version:%s"

bprintf sb " %s -out:%s"
(task.JarFile |> getNewFileName ".jar")
(task.AssemblyName + ".dll")
Expand All @@ -68,7 +73,7 @@ let IKVMCompile workingDirectory tasks =
tasks |> Seq.iter compile

Target "Clean" (fun _ ->
CleanDirs [artifactDir; tempDir; tikaLibDir]
CleanDirs [artifactDir; tempDir; tikaLibDir]
)

Target "SetVersions" (fun _ ->
Expand All @@ -80,8 +85,13 @@ Target "SetVersions" (fun _ ->
)

Target "Build" (fun _ ->
let strongName =
if keyFile.Exists
then ["SignAssembly","true"; "AssemblyOriginatorKeyFile",keyFile.FullName]
else []

!! solutionFile
|> MSBuildRelease "" "Clean;Rebuild"
|> MSBuildReleaseExt "" strongName "Clean;Rebuild"
|> ignore
)

Expand Down Expand Up @@ -116,8 +126,22 @@ Target "PublishNugets" (fun _ ->
WorkingDir = artifactDir })
)

Target "BuildSNK" (fun _ ->
let snkBase64 = environVarOrNone "snk"
match snkBase64 with
| Some env ->
(
trace "Replacing .snk"
keyFile.Delete |> ignore
let snkbytes = System.Convert.FromBase64String(env)
System.IO.File.WriteAllBytes(keyFile.FullName, snkbytes)
)
| None -> trace "No key found in the \"snk\" environment"
)

"Clean"
==> "SetVersions"
==> "BuildSNK"
==> "CompileTikaLib"
==> "Build"
==> "RunTests"
Expand Down
2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ nuget IKVM 8.1.5717
http http://www.frijters.net/ikvmbin-8.1.5717.0.zip

//Tika release Jar URL
http http://www-us.apache.org/dist/tika/tika-app-1.13.jar
http http://www-us.apache.org/dist/tika/tika-app-1.14.jar
676 changes: 499 additions & 177 deletions paket.lock

Large diffs are not rendered by default.

794 changes: 751 additions & 43 deletions src/TikaOnDotNet.Tests/TikaOnDotNet.Tests.csproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;

namespace TikaOnDotNet.TextExtraction
{
public static class StringExtrensions
{
public static string ToFormat(this string formatMe, params object[] args)
{
return String.Format(formatMe, args);
}
}
using System;

namespace TikaOnDotNet.TextExtraction
{
public static class StringExtensions
{
public static string ToFormat(this string formatMe, params object[] args)
{
return String.Format(formatMe, args);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="TikaOnDotNet, Version=1.12.0.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="TikaOnDotNet">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\TikaOnDotNet.dll</HintPath>
</Reference>
Expand All @@ -48,18 +48,18 @@
</Compile>
<Compile Include="MySystemClassLoader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StringExtrensions.cs" />
<Compile Include="StringExtensions.cs" />
<Compile Include="TextExtractionException.cs" />
<Compile Include="TextExtractionResult.cs" />
<Compile Include="TextExtractor.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<None Include="paket.references" />
Expand Down

0 comments on commit 5c5f92f

Please sign in to comment.