Skip to content

Commit 2fc9e1f

Browse files
committed
updated projects so prebuild does not run on unix systems
1 parent 44b88ac commit 2fc9e1f

File tree

4 files changed

+14
-33
lines changed

4 files changed

+14
-33
lines changed

build.sh

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
NUGET="build/tools/nuget/nuget.exe"
22
FAKE="build/tools/FAKE/tools/Fake.exe"
33
NUNIT="build/tools/NUnit.Runners/tools/nunit-console.exe"
4-
4+
FSHARPCLI="build/tools/Fsharp.Formatting.CommandTool/Fsharp.Formatting.CommandTool.nupkg"
5+
SOURCELINK="build/tools/SourceLink.Fake/SourceLink.Fake.nupkg"
56

67
#we need nuget to install tools locally
78
if [[ ! -f "$NUGET" ]]; then
@@ -22,33 +23,15 @@ if [[ ! -f "$NUNIT" ]]; then
2223
mono --runtime=v4.0 "$NUGET" "install" "NUnit.Runners" "-OutputDirectory" "build/tools" "-ExcludeVersion" "-Prerelease"
2324
fi
2425

25-
# we need wintersmith to build our documentation which in turn needs npm/node
26-
# installing and calling this locally so that yours and CI's systems do not need to be configured prior to running build.bat
27-
#if not exist build\tools\Node.js\node.exe (
28-
# ECHO Local node not found.. Installing..
29-
# "build\tools\nuget\nuget.exe" "install" "node.js" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
30-
#)
31-
#if not exist build\tools\Npm\node_modules\npm\cli.js (
32-
# ECHO Local npm not found.. Installing..
33-
# "build\tools\nuget\nuget.exe" "install" "npm" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
34-
#)
35-
#if not exist build\tools\node_modules\wintersmith\bin\wintersmith (
36-
# ECHO wintersmith not found.. Installing..
37-
# cd build\tools
38-
#
39-
# "Node.js\node.exe" "Npm\node_modules\npm\cli.js" install wintersmith
40-
#
41-
# cd ..\..
42-
#)
43-
44-
45-
#SET TARGET="Build"
46-
#SET VERSION="0.1.0"
47-
#IF NOT [%1]==[] (set TARGET="%1")
48-
#IF NOT [%2]==[] (set VERSION="%2")
26+
if [[ ! -f "$FSHARPCLI" ]]; then
27+
echo Fsharp formatting commandtool not found... Installing..
28+
mono --runtime=v4.0 "$NUGET" install FSharp.Formatting.CommandTool -OutputDirectory build/tools -ExcludeVersion -Prerelease
29+
fi
30+
if [[ ! -f "$SOURCELINK" ]]; then
31+
echo SourceLink not found.. installing
32+
mono --runtime=v4.0 "$NUGET" install SourceLink.Fake -OutputDirectory build/tools -ExcludeVersion
33+
fi
4934

50-
mono --runtime=v4.0 "$NUGET" install FSharp.Formatting.CommandTool -OutputDirectory build/tools -ExcludeVersion -Prerelease
51-
mono --runtime=v4.0 "$NUGET" install SourceLink.Fake -OutputDirectory build/tools -ExcludeVersion
5235
#workaround assembly resolution issues in build.fsx
5336
export FSHARPI=`which fsharpi`
5437
cat - > fsharpi <<"EOF"

build/build.fsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ Target "Clean" (fun _ ->
1919
CleanDir buildDir
2020
)
2121

22-
23-
2422
Target "BuildApp" (fun _ ->
2523
let binDirs = !! "src/**/bin/**"
2624
|> Seq.map DirectoryName

src/Connections/Elasticsearch.Net.Connection.Thrift/Elasticsearch.Net.Connection.Thrift.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@
141141
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
142142
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
143143
<PropertyGroup>
144-
<!--<PreBuildEvent>IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
145-
</PreBuildEvent>-->
144+
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
145+
</PreBuildEvent>
146146
</PropertyGroup>
147147
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
148148
Other similar extension points exist, see Microsoft.Common.targets.

src/Elasticsearch.Net/Elasticsearch.Net.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@
109109
</ItemGroup>
110110
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
111111
<PropertyGroup>
112-
<!--<PreBuildEvent>IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
113-
</PreBuildEvent>-->
112+
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
113+
</PreBuildEvent>
114114
</PropertyGroup>
115115
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
116116
Other similar extension points exist, see Microsoft.Common.targets.

0 commit comments

Comments
 (0)