Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
Updates to build process
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof-Cieslak committed Mar 20, 2019
1 parent f25e103 commit eda36ab
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 57 deletions.
22 changes: 18 additions & 4 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
open System
// --------------------------------------------------------------------------------------
// FAKE build script
// --------------------------------------------------------------------------------------
Expand All @@ -23,7 +22,6 @@ open Fake.Api
// --------------------------------------------------------------------------------------

let project = "Forge"

let summary = "Forge is a build tool that provides tasks for creating, compiling, and testing F# projects"

let gitOwner = "ionide"
Expand All @@ -35,12 +33,16 @@ let gitRaw = Environment.environVarOrDefault "gitRaw" ("https://raw.github.com/"
// Build variables
// --------------------------------------------------------------------------------------

let buildDir = "./build/"
let dotnetcliVersion = DotNet.getSDKVersionFromGlobalJson()

System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
let release = ReleaseNotes.parse (System.IO.File.ReadAllLines "RELEASE_NOTES.md")

let tempDir = "./temp"
let testBuildDir = "./temp/test"
let buildDir = __SOURCE_DIRECTORY__ </> "temp"
let forgeSh = "./forge.sh"


// --------------------------------------------------------------------------------------
// Helpers
// --------------------------------------------------------------------------------------
Expand Down Expand Up @@ -109,6 +111,17 @@ Target.create "Build" (fun _ ->
DotNet.build id ""
)

Target.create "Publish" (fun _ ->
DotNet.publish (fun p -> {p with OutputPath = Some (buildDir </> "Bin")}) "src/Forge"

!! (buildDir </> "Bin" </> "*.pdb")
++ (buildDir </> "Bin" </>"*.xml")
|> File.deleteAll

Shell.copyFile buildDir forgeSh

)

Target.create "Test" (fun _ ->
exec "dotnet" @"run --project .\tests\Forge.Tests\Forge.Tests.fsproj" "."
//exec "dotnet" @"run --project .\tests\Forge.IntegrationTests\Forge.IntegrationTests.fsproj" "."
Expand Down Expand Up @@ -187,6 +200,7 @@ Target.create "Release" DoNothing
==> "AssemblyInfo"
==> "Restore"
==> "Build"
==> "Publish"
==> "Test"
==> "Default"

Expand Down
2 changes: 1 addition & 1 deletion forge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# User just ran a symbolic link which points to real Forge.exe
# $0 is an absolute path of this symboliklink
# $* stands for all arguments passed to the command
mono "$(dirname $(readlink $0))/Forge.exe" $*
dotnet "Bin/Forge.dll" $*
11 changes: 0 additions & 11 deletions lib/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions src/Forge/Forge.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
Expand All @@ -17,7 +16,6 @@
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Commands.fs" />
<Compile Include="Program.fs" />
<None Include="app.config" />
<Content Include="Tools/Paket/paket.bootstrapper.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
14 changes: 0 additions & 14 deletions src/Forge/app.config

This file was deleted.

2 changes: 0 additions & 2 deletions tests/Forge.IntegrationTests/Forge.IntegrationTests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
Expand All @@ -20,7 +19,6 @@
<Compile Include="Helpers.fs" />
<Compile Include="Tests.fs" />
<Compile Include="Main.fs" />
<None Include="app.config" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
12 changes: 0 additions & 12 deletions tests/Forge.IntegrationTests/app.config

This file was deleted.

2 changes: 0 additions & 2 deletions tests/Forge.Tests/Forge.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
Expand All @@ -17,7 +16,6 @@
<Compile Include="common.fs" />
<Compile Include="Tests.fs" />
<Compile Include="Main.fs" />
<None Include="app.config" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
9 changes: 0 additions & 9 deletions tests/Forge.Tests/app.config

This file was deleted.

0 comments on commit eda36ab

Please sign in to comment.