Skip to content

Commit

Permalink
Merge pull request #445 from nfdi4plants/developer
Browse files Browse the repository at this point in the history
Update to beta.04
  • Loading branch information
Freymaurer authored Jul 1, 2024
2 parents ca2f0ec + 4368e6d commit ef828e4
Show file tree
Hide file tree
Showing 113 changed files with 9,709 additions and 8,699 deletions.
14 changes: 9 additions & 5 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,29 @@
"version": "8.0.3",
"commands": [
"paket"
]
],
"rollForward": false
},
"fable": {
"version": "4.9.0",
"version": "4.19.0",
"commands": [
"fable"
]
],
"rollForward": false
},
"femto": {
"version": "0.19.0",
"commands": [
"femto"
]
],
"rollForward": false
},
"fantomas": {
"version": "6.2.3",
"commands": [
"fantomas"
]
],
"rollForward": false
}
}
}
13 changes: 12 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@

root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.fs]
fsharp_multiline_bracket_style = stroustrup
fsharp_newline_before_multiline_computation_expression = false
2 changes: 1 addition & 1 deletion .github/workflows/PublishDocker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref, event=branch
type=semver,pattern={{version}}
type=semver,pattern={{raw}}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
Expand Down
47 changes: 26 additions & 21 deletions build/Build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,25 @@ module ReleaseNoteTasks =

open Fake.Extensions.Release

let createVersionFile(version: string) =
let createVersionFile(version: string, commit: bool) =
let releaseDate = System.DateTime.UtcNow.ToShortDateString()
Fake.DotNet.AssemblyInfoFile.createFSharp "src/Server/Version.fs"
[ Fake.DotNet.AssemblyInfo.Title "Swate"
Fake.DotNet.AssemblyInfo.Version version
Fake.DotNet.AssemblyInfo.Metadata ("Version",version)
Fake.DotNet.AssemblyInfo.Metadata ("ReleaseDate",releaseDate)
]
if commit then
run git ["add"; "."] ""
run git ["commit"; "-m"; (sprintf "Release %s :bookmark:" ProjectInfo.prereleaseTag)] ""

let updateReleaseNotes = Target.create "releasenotes" (fun config ->
ReleaseNotes.ensure()

ReleaseNotes.update(ProjectInfo.gitOwner, ProjectInfo.project, config)

let newRelease = ReleaseNotes.load "RELEASE_NOTES.md"
createVersionFile(newRelease.AssemblyVersion)
createVersionFile(newRelease.AssemblyVersion, false)

Trace.trace "Update Version.fs done!"

Expand Down Expand Up @@ -223,30 +226,29 @@ module Release =

open System.Diagnostics

let private executeCommand (command: string) : string =
let p = new Process()
p.StartInfo.FileName <- "git"
p.StartInfo.Arguments <- command
p.StartInfo.RedirectStandardOutput <- true
p.StartInfo.UseShellExecute <- false
p.StartInfo.CreateNoWindow <- true

p.Start() |> ignore
let GetLatestGitTag () : string =
let executeCommand (command: string) : string =
let p = new Process()
p.StartInfo.FileName <- "git"
p.StartInfo.Arguments <- command
p.StartInfo.RedirectStandardOutput <- true
p.StartInfo.UseShellExecute <- false
p.StartInfo.CreateNoWindow <- true

let output = p.StandardOutput.ReadToEnd()
p.WaitForExit()
p.Start() |> ignore

output
let output = p.StandardOutput.ReadToEnd()
p.WaitForExit()

let GetLatestGitTag () : string =
output
executeCommand "describe --abbrev=0 --tags"
|> String.trim

let SetPrereleaseTag() =
printfn "Please enter pre-release package suffix"
let suffix = System.Console.ReadLine()
ProjectInfo.prereleaseSuffix <- suffix
ProjectInfo.prereleaseTag <- (sprintf "%i.%i.%i-%s" ProjectInfo.release.SemVer.Major ProjectInfo.release.SemVer.Minor ProjectInfo.release.SemVer.Patch suffix)
ProjectInfo.prereleaseTag <- (sprintf "v%i.%i.%i-%s" ProjectInfo.release.SemVer.Major ProjectInfo.release.SemVer.Minor ProjectInfo.release.SemVer.Patch suffix)
ProjectInfo.isPrerelease <- true

let CreateTag() =
Expand All @@ -258,15 +260,14 @@ module Release =

let CreatePrereleaseTag() =
if promptYesNo (sprintf "Tagging branch with %s OK?" ProjectInfo.prereleaseTag ) then
Git.Branches.tag "" ProjectInfo.prereleaseTag
run git ["tag"; "-f"; ProjectInfo.prereleaseTag; ] ""
Git.Branches.pushTag "" ProjectInfo.projectRepo ProjectInfo.prereleaseTag
else
failwith "aborted"

let ForcePushNightly() =
if promptYesNo "Ready to force push release to nightly branch?" then
Git.Commit.exec "." (sprintf "Release v%s" ProjectInfo.prereleaseTag)
run git ["push"; "-f"; "origin"; "HEAD:nightly"] __SOURCE_DIRECTORY__
run git ["push"; "-f"; "origin"; "HEAD:nightly"] ""
else
failwith "aborted"

Expand Down Expand Up @@ -404,7 +405,7 @@ let main args =
Release.SetPrereleaseTag()
Release.CreatePrereleaseTag()
let version = Release.GetLatestGitTag()
ReleaseNoteTasks.createVersionFile(version)
ReleaseNoteTasks.createVersionFile(version, true)
Release.ForcePushNightly()
0
| _ ->
Expand All @@ -420,8 +421,12 @@ let main args =
| _ -> runOrDefault args
| "version" :: a ->
match a with
| "create-file" :: version :: a -> ReleaseNoteTasks.createVersionFile(version); 0
| "create-file" :: version :: a -> ReleaseNoteTasks.createVersionFile(version, false); 0
| _ -> runOrDefault args
| "cmdtest" :: a ->
run git ["add"; "."] ""
run git ["commit"; "-m"; (sprintf "Release v%s" ProjectInfo.prereleaseTag)] ""
0
| _ -> runOrDefault args


1 change: 0 additions & 1 deletion build/Build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
<PackageReference Include="Fake.Core.UserInput" Version="5.23.0-alpha002" />
<PackageReference Include="Fake.Tools.Git" Version="5.23.0-alpha002" />
</ItemGroup>
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
12 changes: 6 additions & 6 deletions build/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>5d6f5462-3401-48ec-9406-d12882e9ad83</Id>
<Version>1.0.0</Version>
Expand All @@ -16,7 +16,7 @@
<Host Name="Workbook"/>
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/"/>
<SourceLocation DefaultValue="https://localhost:3000?is_swatehost=2"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
Expand Down Expand Up @@ -65,7 +65,7 @@
<SourceLocation resid="Swate.Core.Url"/>
</Action>
</Control>
<Control xsi:type="Button" id="Swate.Experts">
<!--<Control xsi:type="Button" id="Swate.Experts">
<Label resid="Swate.Experts.Label"/>
<Supertip>
<Title resid="Swate.Experts.Label"/>
Expand All @@ -86,7 +86,7 @@
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Swate.Experts.Url"/>
</Action>
</Control>
</Control>-->
</Group>
</OfficeTab>
</ExtensionPoint>
Expand Down Expand Up @@ -116,8 +116,8 @@
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Swate.Core.Url" DefaultValue="https://localhost:3000/#BuildingBlock"/>
<bt:Url id="Swate.Experts.Url" DefaultValue="https://localhost:3000/#Experts/JsonExport"/>
<bt:Url id="Swate.Core.Url" DefaultValue="https://localhost:3000?is_swatehost=2"/>
<!--<bt:Url id="Swate.Experts.Url" DefaultValue="https://localhost:3000/#Experts/JsonExport"/>-->
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="Get started annotating your data for greater good!"/>
Expand Down
3 changes: 0 additions & 3 deletions build/paket.references

This file was deleted.

Loading

0 comments on commit ef828e4

Please sign in to comment.