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
7 changes: 7 additions & 0 deletions .github/workflows/cloudscribe-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name: cloudscribe-navigation-develop-nuget-build
on:
push:
branches: [ "develop" ]
workflow_dispatch:
# pull_request:
# branches: [ "develop" ]

Expand All @@ -30,3 +31,9 @@ jobs:
run: dotnet pack -c Release
- name: Publish NuGet package
run: dotnet nuget push **/*.nupkg --source ${{ secrets.NUGET_SOURCE_URL }}
- name: Remote Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GHB_PAT }}
repository: GreatHouseBarn/cloudscribe-testing
event-type: cs.Web.Navigation
6 changes: 3 additions & 3 deletions src/NavigationDemo.Web/NavigationDemo.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="cloudscribe.Web.Localization" Version="8.0.0" />
<PackageReference Include="cloudscribe.Web.Localization" Version="8.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/RazorPages.WebApp/RazorPages.WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>aspnet-RazorPages.WebApp-0BEB55BD-36A5-4CAC-A1C9-81104294AB20</UserSecretsId>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<IsPackable>false</IsPackable>
</PropertyGroup>


Expand Down
2 changes: 1 addition & 1 deletion src/cloudscribe.Web.Navigation/TreeNodeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static TreeNode<NavigationNode> FindByUrlExact(

if (!string.IsNullOrEmpty(n.Value.Url))
{
if (n.Value.Url.Equals(urlToMatch, StringComparison.OrdinalIgnoreCase))
if (n.Value.Url.Equals(urlToMatch.TrimEnd('/'), StringComparison.OrdinalIgnoreCase))
{ return true; }
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Description>an ASP.NET Core viewcomponent for menus and breadcrumbs</Description>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>Joe Audette</Authors>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>cloudscribe.Web.SiteMap.FromNavigation a library that implements ISiteMapNodeService using existing tree of nodes from cloudscribe.Web.Navigation.NavigationTreeBuilderService</Description>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>Joe Audette</Authors>
<PackageTags>cloudscribe;mvc;sitemap</PackageTags>
Expand Down
4 changes: 2 additions & 2 deletions src/cloudscribe.Web.SiteMap/cloudscribe.Web.SiteMap.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>ASP.NET Core controller and models for generating an xml sitemap for search indexes http://www.sitemaps.org</Description>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<TargetFramework>net8.0</TargetFramework>

<Authors>Joe Audette</Authors>
Expand Down
52 changes: 52 additions & 0 deletions update_version.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
###################
## PS script to implement a semantic versioning change from (say) 8.0.x to 8.1
## across all interdependent cs packages

## Wherever we have <Version>8.0.n</Version> replace it to <Version>8.1.0</Version> where n >= 0

## Wherever we have <PackageReference Include="cloudscribe.Anything" Version="8.0.*" /> replace it to <PackageReference Include="cloudscribe.Anything" Version="8.1.*" />

## Wherever we have <PackageReference Include="cloudscribe.Anything" Version="8.0.n" /> replace it to <PackageReference Include="cloudscribe.Anything" Version="8.1.0" /> where n >= 0

## Exclude cloudscribe.HtmlAgilityPack and DbHelpers because those ones are ancient and frozen
###################


# Define the directory containing the .csproj files
$directory = "src"

# Define the old & new versions
$oldVersion = '8\.1' # slash needed !
$newVersion = "8.2.0"
$newWildcardVersion = "8.2.*"


# Get all .csproj files in the directory and subdirectories
$csprojFiles = Get-ChildItem -Path $directory -Recurse -Filter *.csproj

foreach ($file in $csprojFiles) {
# Read the content of the .csproj file
$content = Get-Content -Path $file.FullName

# Update the version of cloudscribe package references, except for cloudscribe.HtmlAgilityPack and cloudscribe.DbHelpers

$wildCardPattern = '(?<=<PackageReference Include="cloudscribe\.(?!HtmlAgilityPack|DbHelpers)[^"]+" Version=")' + $oldVersion + '\.\*'
$updatedContent = $content -replace $wildCardPattern, $newWildcardVersion

$digitPattern = '(?<=<PackageReference Include="cloudscribe\.(?!HtmlAgilityPack|DbHelpers)[^"]+" Version=")' + $oldVersion + '\.\d+'
$updatedContent = $updatedContent -replace $digitPattern, $newVersion

# Update the <Version> element if it matches the pattern
$versionPattern = '<Version>' + $oldVersion + '\.\d+</Version>'
$replacement = "<Version>$newVersion</Version>"
$updatedContent = $updatedContent -replace $versionPattern, $replacement


# Write the updated content back to the .csproj file
Set-Content -Path $file.FullName -Value $updatedContent

Write-Host "Updated $file.FullName"
}

Write-Host "All cloudscribe package references (except cloudscribe.HtmlAgilityPack and cloudscribe.DbHelpers) and <Version> elements have been updated to version $newVersion or $newWildcardVersion as appropriate."

Loading