Skip to content

Commit

Permalink
Merge branch 'v2_develop' into v2_release
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed Feb 18, 2025
2 parents 9f950be + dfb3e92 commit 396b5ea
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 14 deletions.
18 changes: 9 additions & 9 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ mode: ContinuousDeployment
tag-prefix: '[vV]'
continuous-delivery-fallback-tag: dev
branches:
v2_develop:
develop:
mode: ContinuousDeployment
tag: dev
regex: ^v2_develop?[/-]
tag: develop
regex: v2_develop
tracks-release-branches: true
is-source-branch-for: ['v2_release']
is-source-branch-for: ['main']
source-branches: []

v2_release:
main:
mode: ContinuousDeployment
tag: prealpha
regex: v2_release
is-release-branch: true
source-branches: ['v2_develop']
source-branches: ['develop']

v1_develop:
mode: ContinuousDeployment
tag: dev
tag: v1_develop
regex: v1_develop
source-branches:
- v1_release
Expand All @@ -38,8 +38,8 @@ branches:
tag-number-pattern: '[/-](?<number>\d+)'
regex: ^(pull|pull\-requests|pr)[/-]
source-branches:
- v2_develop
- v2_release
- develop
- main
- feature
- support
- hotfix
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ cd myproj
dotnet run
```

There is also a [visual designer](https://github.com/gui-cs/TerminalGuiDesigner) (uses Terminal.Gui itself).

## Documentation

* [Getting Started](https://gui-cs.github.io/Terminal.GuiV2Docs/docs/getting-started.html)
Expand All @@ -47,14 +49,16 @@ The team is looking forward to seeing new amazing projects made by the community

## Sample Usage in C#

The following example shows a basic Terminal.Gui application in C#:

[!code-csharp[](./Example/Example.cs)]
The following example shows a basic Terminal.Gui application in C#:
[Example (source)](./Example/Example.cs)

When run the application looks as follows:

![Simple Usage app](./docfx/images/Example.png)

## Sample usage in F#
F# examples are located [here](./FSharpExample/Program.fs)

## Installing

Use NuGet to install the `Terminal.Gui` NuGet package: https://www.nuget.org/packages/Terminal.Gui
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/Terminal.Gui.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- =================================================================== -->
<!-- Version numbers -->
<!-- Automatically updated by gitversion (run `dotnet-gitversion /updateprojectfiles`) -->
<!-- Automatically updated by gitversion (run `dotnet-gitversion`) -->
<!-- GitVersion.xml controls settings -->
<!-- =================================================================== -->
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/Text/TextFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@ public static string RemoveHotKeySpecifier (string text, int hotPos, Rune hotKey
var start = string.Empty;
var i = 0;

foreach (Rune c in text)
foreach (Rune c in text.EnumerateRunes ())
{
if (c == hotKeySpecifier && i == hotPos)
{
Expand Down
12 changes: 12 additions & 0 deletions UnitTests/Views/LabelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1460,4 +1460,16 @@ public void CanFocus_True_MouseClick_Focuses ()
Application.Top.Dispose ();
Application.ResetState ();
}

// https://github.com/gui-cs/Terminal.Gui/issues/3893
[Fact]
[SetupFakeDriver]
public void TestLabelUnderscoreMinus ()
{
var lbl = new Label ()
{
Text = "TextView with some more test_- text. Unicode shouldn't 𝔹Aℝ𝔽!"
};
lbl.Draw ();
}
}
31 changes: 31 additions & 0 deletions delist-nuget.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
$apiKey = "key" # Replace with your actual API key
# Unlist all packages matching "2.0.0-v2-develop.*"
# PowerShell script to unlist NuGet packages using dotnet CLI
$packageId = "terminal.gui" # Ensure this is the correct package name (case-sensitive)
$packagePattern = "^2\.0\.0-v2-develop\..*$" # Regex pattern for filtering versions
$nugetSource = "https://api.nuget.org/v3/index.json"

# Fetch package versions from NuGet API
$nugetApiUrl = "https://api.nuget.org/v3-flatcontainer/$packageId/index.json"
Write-Host "Fetching package versions for '$packageId'..."

try {
$versionsResponse = Invoke-RestMethod -Uri $nugetApiUrl
$matchingVersions = $versionsResponse.versions | Where-Object { $_ -match $packagePattern }
} catch {
Write-Host "Error fetching package versions: $_"
exit 1
}

if ($matchingVersions.Count -eq 0) {
Write-Host "No matching packages found for '$packageId' with pattern '$packagePattern'."
exit 0
}

# Unlist each matching package version
foreach ($version in $matchingVersions) {
Write-Host "Unlisting package: $packageId - $version"
dotnet nuget delete $packageId $version --source $nugetSource --api-key $apiKey --non-interactive
}

Write-Host "Operation complete."

0 comments on commit 396b5ea

Please sign in to comment.