Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true

- name: Setup dotnet
uses: actions/setup-dotnet@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
task: macosUniversalBinary
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
Expand Down
11 changes: 9 additions & 2 deletions Marksman/Fatality.fs
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
module Marksman.Fatality

open System.Reflection
open Ionide.LanguageServerProtocol.Types

open Marksman.Misc
open Marksman.State
open Marksman.Workspace

let abort (stateOpt: Option<State>) (ex: exn) =
let marksmanAssembly = typeof<State>.Assembly.GetName()
let marksmanAssembly = typeof<State>.Assembly

let marksmanVersion =
marksmanAssembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
|> Option.ofObj
|> Option.map (fun attr -> attr.InformationalVersion)
|> Option.defaultValue (marksmanAssembly.GetName().Version.ToString())

let clientDebugOut ({ Name = name; Version = versionOpt }: ClientInfo) =
eprintf $"Client: {name}"
Expand Down Expand Up @@ -35,7 +42,7 @@ let abort (stateOpt: Option<State>) (ex: exn) =
eprintfn "Marksman encountered a fatal error"
eprintfn "Please, report the error at https://github.com/artempyanykh/marksman/issues"
eprintfn "---------------------------------------------------------------------------"
eprintfn $"Marksman version: {marksmanAssembly.Version}"
eprintfn $"Marksman version: {marksmanVersion}"
eprintfn $"OS: {System.Runtime.InteropServices.RuntimeInformation.OSDescription}"
eprintfn $"Arch: {System.Runtime.InteropServices.RuntimeInformation.OSArchitecture}"
Option.iter stateDebugOut stateOpt
Expand Down
16 changes: 8 additions & 8 deletions Marksman/Marksman.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<Target Name="Version" BeforeTargets="BeforeBuild">
<Exec Command="git describe --always --dirty" ConsoleToMSBuild="true" Condition="'$(VersionString)'==''">
<Exec Command="git describe --tags --long --always --dirty" ConsoleToMSBuild="true" Condition="'$(VersionString)'==''">
<Output TaskParameter="ConsoleOutput" PropertyName="VersionString"/>
</Exec>
<PropertyGroup>
<VersionSuffix>$(VersionString)</VersionSuffix>
<VersionSuffix Condition="$(VersionString.StartsWith('0'))">r$(VersionString)</VersionSuffix>
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
<Version>$(VersionSuffix)</Version>
</PropertyGroup>
</Target>
<ItemGroup>
Expand Down Expand Up @@ -58,14 +58,14 @@
<Compile Include="Program.fs"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.SystemCommandLine" Version="2.0.0" />
<PackageReference Include="FSharpPlus" Version="1.8.0" />
<PackageReference Include="FSharp.SystemCommandLine" Version="2.0.0"/>
<PackageReference Include="FSharpPlus" Version="1.8.0"/>
<PackageReference Include="Glob" Version="1.1.9"/>
<PackageReference Include="Markdig" Version="0.43.0" />
<PackageReference Include="Markdig" Version="0.43.0"/>
<!-- <PackageReference Include="Ionide.LanguageServerProtocol" Version="0.3.1" />-->
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Tomlyn" Version="0.19.0" />
<PackageReference Include="Serilog" Version="2.12.0"/>
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0"/>
<PackageReference Include="Tomlyn" Version="0.19.0"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LanguageServerProtocol\LanguageServerProtocol.fsproj"/>
Expand Down