Skip to content

Commit 14d85dc

Browse files
authored
Add AngouriMath.Terminal to NuGet publishing workflow and use ProjectReference for internal dependencies (#647)
1 parent 4fc6fda commit 14d85dc

5 files changed

Lines changed: 22 additions & 19 deletions

File tree

.github/workflows/Nuget.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,12 @@ jobs:
9292
dotnet pack -c Release -p:PackageVersion=${{ steps.version.outputs.version }}
9393
cd bin/Release
9494
dotnet nuget push AngouriMath.Interactive.${{ steps.version.outputs.version }}.nupkg --api-key ${{ steps.version.outputs.apikey }} --source "${{ steps.version.outputs.source }}"
95+
96+
- name: 'Pack and publish AngouriMath.Terminal'
97+
run: |
98+
cd Sources/Terminal/AngouriMath.Terminal
99+
dotnet restore
100+
dotnet build -c Release
101+
dotnet pack -c Release -p:PackageVersion=${{ steps.version.outputs.version }}
102+
cd bin/Release
103+
dotnet nuget push AngouriMath.Terminal.${{ steps.version.outputs.version }}.nupkg --api-key ${{ steps.version.outputs.apikey }} --source "${{ steps.version.outputs.source }}"

Sources/Terminal/AngouriMath.Terminal/AngouriMath.Terminal.fsproj

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<PackageIcon>icon.png</PackageIcon>
1414
<Description>F#-based command line interface for symbolic algebra library AngouriMath</Description>
1515

16-
<Version>1.4.0-preview.3-2</Version>
17-
1816
<PackageTags>$(PackageTags), cli, terminal</PackageTags>
1917
</PropertyGroup>
2018

@@ -28,9 +26,9 @@
2826
</ItemGroup>
2927

3028
<ItemGroup>
31-
<PackageReference Include="Spectre.Console" Version="0.41.0" />
32-
<PackageReference Include="radline" Version="0.5.0" />
33-
<PackageReference Include="Spectre.Console.ImageSharp" Version="0.41.0" />
29+
<PackageReference Include="Spectre.Console" Version="0.54.0" />
30+
<PackageReference Include="RadLine" Version="0.9.0" />
31+
<PackageReference Include="Spectre.Console.ImageSharp" Version="0.54.0" />
3432
</ItemGroup>
3533

3634
</Project>

Sources/Terminal/AngouriMath.Terminal/Program.fs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let lineEditor = getLineEditor AnsiConsole.Console
1717

1818
let rec readAndRespond kernel =
1919
printf "\n"
20-
match readLine lineEditor |> execute kernel with
20+
match readLine lineEditor |> nonNull |> execute kernel with
2121
| PlainTextSuccess text ->
2222
writeLine AnsiConsole.Console text
2323
| LatexSuccess (_, text) ->
@@ -36,23 +36,16 @@ let handleErrors errors =
3636

3737
"\n\n" |> Console.Write
3838

39-
FigletText "AngouriMath"
40-
|> AlignableExtensions.Centered
41-
|> (fun p -> FigletTextExtensions.Color(p, Color.Pink1))
39+
FigletText("AngouriMath", Justification = Justify.Center, Color = Color.Pink1)
4240
|> AnsiConsole.Console.Write
4341

44-
$@"
42+
Markup($@"
4543
Hi! Type `help ()` to get more info.
46-
" |> Markup
47-
|> AlignableExtensions.Centered
48-
|> AnsiConsole.Console.Write
49-
50-
51-
44+
", Justification = Justify.Center)
45+
|> AnsiConsole.Console.Write
5246

5347
printf "Starting the kernel..."
5448

55-
5649
match createKernel () with
5750
| Result.Error reasons -> handleErrors reasons
5851
| Result.Ok kernel ->

Sources/Wrappers/AngouriMath.FSharp/AngouriMath.FSharp.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</ItemGroup>
3333

3434
<ItemGroup>
35-
<PackageReference Include="AngouriMath" Version="1.4.0-preview.3" />
35+
<ProjectReference Include="..\..\AngouriMath\AngouriMath.csproj" />
3636
</ItemGroup>
3737

3838
</Project>

Sources/Wrappers/AngouriMath.Interactive/AngouriMath.Interactive.fsproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
</ItemGroup>
4040

4141
<ItemGroup>
42-
<PackageReference Include="AngouriMath.FSharp" Version="1.4.0-preview.3" />
42+
<ProjectReference Include="..\AngouriMath.FSharp\AngouriMath.FSharp.fsproj" />
43+
</ItemGroup>
44+
45+
<ItemGroup>
4346
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.23611.1" />
4447
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.23611.1" />
4548
<PackageReference Include="Plotly.NET" Version="6.0.0-preview.1" />

0 commit comments

Comments
 (0)