Skip to content

Commit

Permalink
Removed unnecessary build from build script
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri committed Oct 11, 2024
1 parent f9106f2 commit d90f0e9
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions build/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -90,45 +90,31 @@ Target.create BuildTarget <| fun _ ->
})

let startGraphQLServer (project : string) port (streamRef : DataRef<Stream>) =
DotNet.build
(fun options -> {
options with
Configuration = configuration
MSBuildParams = { options.MSBuildParams with DisableInternalBinLog = true }
})
project

CreateProcess.fromRawCommandLine "dotnet" $"run --project {project} --configuration {configurationString} --urls=http://localhost:%i{port}/"
CreateProcess.fromRawCommandLine "dotnet" $"run --project {project} --no-build --configuration {configurationString} --urls=http://localhost:%i{port}/"
|> CreateProcess.withStandardInput (CreatePipe streamRef)
|> Proc.start
|> ignore

System.Threading.Thread.Sleep (2000)

let runTests (project : string) (args : string) =
DotNet.build
(fun options -> {
options with
Framework = Some DotNetMoniker
Configuration = configuration
MSBuildParams = { options.MSBuildParams with DisableInternalBinLog = true }
})
project

let customParams = String.Join (' ', "--no-build -v=normal", args)

DotNet.test
(fun options ->
{
options with
NoBuild = true
Framework = Some DotNetMoniker
Configuration = configuration
MSBuildParams = {
options.MSBuildParams with
DisableInternalBinLog = true
Verbosity = Some Normal
Properties = [
if embedAll then
("DebugType", "embedded")
("EmbedAllSources", "true")
]
}
Common = { options.Common with CustomParams = Some customParams }
}
.WithCommon
DotNetCli.setVersion)
Expand Down Expand Up @@ -262,6 +248,7 @@ let pack id =
options with
Common = { options.Common with Version = Some release.NugetVersion }
NoLogo = true
NoBuild = true
OutputPath = Some packageDir
MSBuildParams = {
options.MSBuildParams with
Expand Down

0 comments on commit d90f0e9

Please sign in to comment.