Skip to content

Release 0.17.0 #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
May 26, 2022
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
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build NStack

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
outputs:
Version: ${{ steps.gitversion.outputs.SemVer }}
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 #fetch-depth is needed for GitVersion

#Install and calculate the new version with GitVersion
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: 5.x
- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
id: gitversion # step id used as reference for output values
- name: Display GitVersion outputs
run: |
echo "Version: ${{ steps.gitversion.outputs.SemVer }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"

- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build Debug
run: |
dotnet-gitversion /updateprojectfiles
dotnet build --no-restore -c Debug

- name: Test
run: dotnet test --no-build --verbosity normal
53 changes: 53 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish NStack.Core to NuGet
on:
push:
tags:
- v*

jobs:

publish:
name: build, pack & publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 #fetch-depth is needed for GitVersion

- name: Install and calculate the new version with GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: 5.x
- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
id: gitversion # step id used as reference for output values
- name: Display GitVersion outputs
run: |
echo "Version: ${{ steps.gitversion.outputs.SemVer }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"

- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build Release
run: |
dotnet-gitversion /updateprojectfiles
dotnet build --no-restore -c Release

- name: Pack
run: dotnet pack -c Release -p:Version='${{ steps.gitversion.outputs.SemVer }}' -v d

#- name: Prep GitHub Packages
# run: dotnet nuget add source --username tig --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/tig/index.json"

#- name: Publish to GitHub packages
# run: dotnet nuget push NStack/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"

- name: Publish to NuGet.org
run: dotnet nuget push NStack/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
all: dotnet-build doc-update yaml

dotnet-build:
dotnet-gitversion /updateprojectfiles
msbuild NStack.sln /t:clean /p:configuration=Release
msbuild NStack.sln -t:restore -p:RestorePackagesConfig=true /p:configuration=Release
msbuild NStack.sln /p:Configuration=Release /p:DocumentationFile="bin/Release/NStack.xml"
Expand Down
7 changes: 7 additions & 0 deletions NStack.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NStack", "NStack\NStack.csp
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NStackTests", "NStackTests\NStackTests.csproj", "{21125504-5F4D-48A3-8978-A552627A8D26}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{760C271D-E55A-4F44-BE2C-9B476D310CAC}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
6 changes: 0 additions & 6 deletions NStack/Makefile

This file was deleted.

3 changes: 2 additions & 1 deletion NStack/NStack.Core.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>NStack.Core</id>
<version>0.4.0</version>
<!--Version is managed by gitver now. See publish.yml-->
<version>0.0.0</version>
<title>NStack.Core</title>
<authors>Miguel de Icaza</authors>
<owners>Miguel de Icaza</owners>
Expand Down
44 changes: 25 additions & 19 deletions NStack/NStack.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.props" Condition="Exists('..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.props')" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RepositoryUrl>https://github.com/tig/NStack</RepositoryUrl>
<PackageId>NStack.Core</PackageId>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
<PackageVersion>0.16</PackageVersion>
<Authors>Miguel de Icaza</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Owners>Miguel de Icaza</Owners>
<PackageProjectUrl>http://github.com/migueldeicaza/NStack</PackageProjectUrl>
<Summary>NStack.Core brings a set of updated APIs to .NET including a UTF8-string aware string.</Summary>
<Summary>NStack.Core brings a set of updated string APIs to .NET including a UTF8-string aware string.</Summary>
<PackageTags>unicode, c#</PackageTags>
<Title>NStack.Core</Title>
<Description>NStack.Core brings a set of updated APIs to .NET.
<Description>NStack.Core brings a set of updated string APIs to .NET.

It starts with a new string type that is focused on Unicode code-points as opposed to the historical chars and UTF-16 encoding and introduces a utf8 string that supports slicing</Description>
<ReleaseVersion>0.3</ReleaseVersion>
<PackageReleaseNotes>0.16: Fixes issue #51 (chess symbols); 0.15: Fixes to MaxRune; ColumnWidth differentiates between non-printable and nul characters; Rune has a constructor from two surrogate pairs; contributions by @BDisp; 0.14: Upgrade the NetStandard dependencies;

<PackageReleaseNotes>
0.17: Fork by @tig modernize build/deploy and help publishing newer versions. No functional changes.
0.16: Fixes issue #51 (chess symbols);
0.15: Fixes to MaxRune; ColumnWidth differentiates between non-printable and nul characters; Rune has a constructor from two surrogate pairs; contributions by @BDisp;
0.14: Upgrade the NetStandard dependencies;
0.13: Fixes ustring.Map() and Lower(); Extends Rune.IsValid to match Go; add Rune.ExpectedSizeFromFirstByte() plus a bug fix;
stack 0.12: Rebuilt
stack
0.12: Rebuilt
Rebuild with an older Roslyn, to prevent regressions on Xamarin.

0.10:
Merged some changes from upstream.

Expand All @@ -34,21 +34,27 @@ Added ustring.ColumnWidth to return number of columns that a ustring takes in a
* Renamed some methods to match the equivalent methods in Char.
* Introduced Substring (int start)
* Introduced difference between this [int start, int end] and this [int start, object end] the latter used to mean "until the end", replacing '0' as the previous value for "until the end".
* Introduced new method in Rune to measure the width in columns for console applications.</PackageReleaseNotes>
* Introduced new method in Rune to measure the width in columns for console applications.
</PackageReleaseNotes>

<!--Version is managed by gitver now. See publish.yml-->
<AssemblyVersion>0.20.0.0</AssemblyVersion>
<FileVersion>0.20.0.0</FileVersion>
<InformationalVersion>0.20.0+Branch.main.Sha.8157792de6c7c039bf62aea2965505b27d1fffc9</InformationalVersion>
<Version>0.20.0</Version>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<DocumentationFile>bin\Release\NStack.xml</DocumentationFile>
<LangVersion>Latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>Latest</LangVersion>
</PropertyGroup>
<Import Project="..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.targets" Condition="Exists('..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.targets')" />
<ItemGroup>
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
</Project>
<Import Project="..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.targets" Condition="Exists('..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.targets')" />
<ItemGroup>
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
</Project>
48 changes: 23 additions & 25 deletions NStackTests/NStackTests.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NStack\NStack.csproj" />
</ItemGroup>

</Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyVersion>0.20.0.0</AssemblyVersion>
<FileVersion>0.20.0.0</FileVersion>
<InformationalVersion>0.20.0+Branch.main.Sha.8157792de6c7c039bf62aea2965505b27d1fffc9</InformationalVersion>
<Version>0.20.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NStack\NStack.csproj" />
</ItemGroup>
</Project>
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

[![Build Status](https://travis-ci.org/migueldeicaza/NStack.svg?branch=master)](https://travis-ci.org/migueldeicaza/NStack)

Currently this module contains a port of the Go string, and Go rune
support as well as other Unicode helper methods.
Currently this library contains a port of the Go string, and Go rune support as well as other Unicode helper methods.

You can browse the [API documentation](https://migueldeicaza.github.io/NStack/api/NStack.html).

Install the [NuGet package](https://www.nuget.org/packages/NStack.Core) by installing
`NStack.Core`.
Install the [NuGet package from NuGet.org](https://www.nuget.org/packages/NStack.Core) by installing `NStack.Core`.

# Future Additions

Expand Down
26 changes: 0 additions & 26 deletions azure-pipelines.yml

This file was deleted.