Skip to content

Commit

Permalink
(WIP) Add buildSourceFiles TaskInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
omaus committed Mar 21, 2024
1 parent e63c9fa commit f820d7e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build/BasicTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ open Fake.DotNet
open Fake.IO.Globbing.Operators
open System.IO
open Fake.IO
open ARCTokenization.StructuralOntology
open FSharpAux

open ProjectInfo

Expand Down Expand Up @@ -46,6 +48,17 @@ let buildOntologies =
)
}

let buildSourceFiles =
BuildTask.create "BuildSourceFiles" [clean; buildOntologies] {
sourceFileSources
|> List.iter (fun sourceFileSource ->
let oboFileName =
FileInfo sourceFileSource
let oboFile = OBO.NET.OboOntology.fromFile false sourceFileSource
let modName = List.head oboFile.Terms |> CodeGeneration.toTermSourceRef
CodeGeneration.toFile modName oboFile

Check failure on line 59 in build/BasicTasks.fs

View workflow job for this annotation

GitHub Actions / build-and-test-windows

This expression was expected to have type� 'unit' �but here has type� 'string -> unit'

Check failure on line 59 in build/BasicTasks.fs

View workflow job for this annotation

GitHub Actions / build-and-test-windows

This expression was expected to have type� 'unit' �but here has type� 'string -> unit'

Check failure on line 59 in build/BasicTasks.fs

View workflow job for this annotation

GitHub Actions / build-and-test-linux

This expression was expected to have type� 'unit' �but here has type� 'string -> unit'

Check failure on line 59 in build/BasicTasks.fs

View workflow job for this annotation

GitHub Actions / build-and-test-linux

This expression was expected to have type� 'unit' �but here has type� 'string -> unit'
)
}

/// builds the solution file (dotnet build solution.sln)
let buildSolution =
Expand Down
1 change: 1 addition & 0 deletions build/Build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\src\ARCTokenization\ARCTokenization.fsproj" PackageVersion="[1.0.0, 2.0.0)" />
<PackageReference Include="BlackFox.Fake.BuildTask" Version="0.1.3" />
<PackageReference Include="Fake.Api.Github" Version="5.23.1" />
<PackageReference Include="Fake.Core.Process" Version="5.23.1" />
Expand Down
8 changes: 8 additions & 0 deletions build/ProjectInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ let structuralOntologySources = [
"src/ARCTokenization/structural_ontologies/arc_file_structure_ontology.yml"
]

let sourceFileSources = [
"src/ARCTokenization/structural_ontologies/investigation_metadata_structural_ontology.obo"
"src/ARCTokenization/structural_ontologies/study_metadata_structural_ontology.obo"
"src/ARCTokenization/structural_ontologies/assay_metadata_structural_ontology.obo"
"src/ARCTokenization/structural_ontologies/arc_process_graph_structural_ontology.obo"
"src/ARCTokenization/structural_ontologies/arc_file_structure_ontology.obo"
]

let solutionFile = $"{project}.sln"

let configuration = "Release"
Expand Down

0 comments on commit f820d7e

Please sign in to comment.