@@ -64,6 +64,9 @@ module AssemblyCheck =
64
64
65
65
let verifyAssemblies ( binariesPath : string ) =
66
66
67
+ // When building in the VMR, the package cache directory is under artifacts and should not be scanned.
68
+ let vmrPackageCacheDirectory = $" {Path.DirectorySeparatorChar}package-cache{Path.DirectorySeparatorChar}"
69
+
67
70
let excludedAssemblies =
68
71
[ ] |> Set.ofList
69
72
@@ -84,7 +87,13 @@ module AssemblyCheck =
84
87
85
88
let fsharpExecutingWithEmbeddedPdbs =
86
89
fsharpAssemblies
87
- |> List.filter ( fun p -> not ( p.Contains( @" \Proto\" ) || p.Contains( @" \Bootstrap\" ) || p.Contains( @" .resources." ) || p.Contains( @" \FSharpSdk\" ) || p.Contains( @" \tmp\" ) || p.Contains( @" \obj\" )))
90
+ |> List.filter ( fun p -> not ( p.Contains( $" {Path.DirectorySeparatorChar}Proto{Path.DirectorySeparatorChar}" ) ||
91
+ p.Contains( $" {Path.DirectorySeparatorChar}Bootstrap{Path.DirectorySeparatorChar}" ) ||
92
+ p.Contains( " .resources." ) ||
93
+ p.Contains( $" {Path.DirectorySeparatorChar}FSharpSdk{Path.DirectorySeparatorChar}" ) ||
94
+ p.Contains( $" {Path.DirectorySeparatorChar}tmp{Path.DirectorySeparatorChar}" ) ||
95
+ p.Contains( $" {Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}" ) ||
96
+ p.Contains( vmrPackageCacheDirectory)))
88
97
89
98
// verify that all assemblies have a version number other than 0.0.0.0 or 1.0.0.0
90
99
let failedVersionCheck =
@@ -99,21 +108,22 @@ module AssemblyCheck =
99
108
100
109
if failedVersionCheck.Length > 0 then
101
110
printfn " The following assemblies had a version of %A or %A " versionZero versionOne
102
- printfn " %s \r\n " <| String.Join( " \r\n " , failedVersionCheck)
111
+ printfn " %s " <| String.Join( Environment.NewLine , failedVersionCheck)
103
112
else
104
113
printfn " All shipping assemblies had an appropriate version number."
105
114
106
115
// verify that all assemblies have a commit hash
107
116
let failedCommitHash =
108
117
fsharpAssemblies
109
- |> List.filter ( fun p -> not ( p.Contains( @" \FSharpSdk\" )))
118
+ |> List.filter ( fun p -> not ( p.Contains( $" {Path.DirectorySeparatorChar}FSharpSdk{Path.DirectorySeparatorChar}" ) ||
119
+ p.Contains( vmrPackageCacheDirectory)))
110
120
|> List.filter ( fun a ->
111
121
let fileProductVersion = FileVersionInfo.GetVersionInfo( a) .ProductVersion
112
122
not ( commitHashPattern.IsMatch( fileProductVersion) || devVersionPattern.IsMatch( fileProductVersion)))
113
123
114
124
if failedCommitHash.Length > 0 then
115
125
printfn " The following assemblies don't have a commit hash set"
116
- printfn " %s \r\n " <| String.Join( " \r\n " , failedCommitHash)
126
+ printfn " %s%s " ( String.Join( Environment.NewLine , failedCommitHash)) Environment.NewLine
117
127
else
118
128
printfn " All shipping assemblies had an appropriate commit hash."
119
129
@@ -124,7 +134,7 @@ module AssemblyCheck =
124
134
125
135
if failedVerifyEmbeddedPdb.Length > 0 then
126
136
printfn " The following assemblies don't have an embedded pdb"
127
- printfn " %s \r\n " <| String.Join( " \r\n " , failedVerifyEmbeddedPdb)
137
+ printfn " %s%s " ( String.Join( Environment.NewLine , failedVerifyEmbeddedPdb)) Environment.NewLine
128
138
else
129
139
printfn " All shipping assemblies had an embedded PDB."
130
140
0 commit comments