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-syndication-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.Syndication
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.netcore mvc controller for rss feeds</Description>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>Joe Audette</Authors>
<PackageTags>cloudscribe;syndication;rss;atom;feed</PackageTags>
Expand Down
4 changes: 2 additions & 2 deletions src/cloudscribe.Syndication/cloudscribe.Syndication.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>cloudscribe.Syndication Class Library</Description>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>Joe Audette</Authors>
<PackageTags>cloudscribe;syndication;rss;atom;feed;xml</PackageTags>
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."