Skip to content

Commit a7e06a6

Browse files
authored
Merge pull request #4321 from brettfo/version-check
use fsi for assembly version check
2 parents 09313af + d54adbc commit a7e06a6

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

build.cmd

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,10 @@ if "%RestorePackages%" == "true" (
603603
)
604604
)
605605

606-
call %~dp0init-tools.cmd
606+
if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" (
607+
:: Restore the Tools directory
608+
call %~dp0init-tools.cmd
609+
)
607610

608611
echo ----------- Done with package restore, starting dependency uptake check -------------
609612

@@ -696,7 +699,9 @@ if "%BUILD_PHASE%" == "1" (
696699

697700
echo ---------------- Done with build, starting assembly version checks ---------------
698701
set asmvercheckpath=%~dp0tests\fsharpqa\testenv\src\AssemblyVersionCheck
699-
%_dotnet20exe% run -p "%asmvercheckpath%\AssemblyVersionCheck.fsproj" "%~dp0build\config\AssemblySignToolData.json" "%~dp0%BUILD_CONFIG%"
702+
703+
echo "%~dp0%BUILD_CONFIG%\net40\bin\fsi.exe" %asmvercheckpath%\AssemblyVersionCheck.fsx -- "%~dp0build\config\AssemblySignToolData.json" "%~dp0%BUILD_CONFIG%"
704+
"%~dp0%BUILD_CONFIG%\net40\bin\fsi.exe" %asmvercheckpath%\AssemblyVersionCheck.fsx -- "%~dp0build\config\AssemblySignToolData.json" "%~dp0%BUILD_CONFIG%"
700705
if ERRORLEVEL 1 echo Error verifying assembly versions and commit hashes. && goto :failure
701706

702707
echo ---------------- Done with assembly version checks, starting assembly signing ---------------

tests/fsharpqa/testenv/src/AssemblyVersionCheck/AssemblyVersionCheck.fsproj

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/fsharpqa/testenv/src/AssemblyVersionCheck/Program.fs renamed to tests/fsharpqa/testenv/src/AssemblyVersionCheck/AssemblyVersionCheck.fsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
2+
3+
// this was restored by packages.config in the root
4+
#r @"..\..\..\..\..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll"
25

36
open System
47
open System.Diagnostics
@@ -78,10 +81,15 @@ module AssemblyVersionCheck =
7881
// return code is the number of failures
7982
failedVersionCheck.Length + failedCommitHash.Length
8083

81-
[<EntryPoint>]
82-
let main argv =
84+
let main (argv:string array) =
8385
if argv.Length <> 2 then
84-
printfn "Usage: AssemblyVersionCheck.exe SignToolData.json path/to/binaries"
86+
printfn "Usage: fsi.exe AssemblyVersionCheck.fsx -- SignToolData.json path/to/binaries"
8587
1
8688
else
8789
AssemblyVersionCheck.verifyAssemblyVersions argv.[0] argv.[1]
90+
91+
Environment.GetCommandLineArgs()
92+
|> Seq.skipWhile ((<>) "--")
93+
|> Seq.skip 1
94+
|> Array.ofSeq
95+
|> main

0 commit comments

Comments
 (0)