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-simplecontactform-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.SimpleContactForm
12 changes: 6 additions & 6 deletions src/WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -24,11 +24,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="cloudscribe.Core.Web" Version="8.0.0" />
<PackageReference Include="cloudscribe.Core.CompiledViews.Bootstrap3" Version="8.0.0" />
<PackageReference Include="cloudscribe.Core.Storage.NoDb" Version="8.0.0" />
<PackageReference Include="cloudscribe.Logging.Web" Version="8.0.0" />
<PackageReference Include="cloudscribe.Logging.NoDb" Version="8.0.0" />
<PackageReference Include="cloudscribe.Core.Web" Version="8.1.*" />
<PackageReference Include="cloudscribe.Core.CompiledViews.Bootstrap3" Version="8.1.0" />
<PackageReference Include="cloudscribe.Core.Storage.NoDb" Version="8.1.0" />
<PackageReference Include="cloudscribe.Logging.Web" Version="8.1.0" />
<PackageReference Include="cloudscribe.Logging.NoDb" Version="8.1.0" />
</ItemGroup>

</Project>
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>Integration library for usingcloudscribe SimpleContactForm with cloudscribe.Core</Description>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>Joe Audette</Authors>
<PackageTags>cloudscribe;contact form</PackageTags>
Expand All @@ -23,7 +23,7 @@
<ProjectReference Include="..\cloudscribe.SimpleContactForm\cloudscribe.SimpleContactForm.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="cloudscribe.Core.Models" Version="8.0.0" />
<PackageReference Include="cloudscribe.Core.Models" Version="8.1.0" />
</ItemGroup>

</Project>
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>A simple contact form for ASP.NET Core</Description>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>Joe Audette</Authors>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
Expand Down Expand Up @@ -36,8 +36,8 @@
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.0" />
<PackageReference Include="cloudscribe.Web.Common" Version="8.0.0" />
<PackageReference Include="cloudscribe.Email.Senders" Version="8.0.0" />
<PackageReference Include="cloudscribe.Web.Common" Version="8.1.0" />
<PackageReference Include="cloudscribe.Email.Senders" Version="8.1.0" />
</ItemGroup>

</Project>
23 changes: 16 additions & 7 deletions update_version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
# Define the directory containing the .csproj files
$directory = "src"

# Define the new version
$newVersion = "8.1.0"
$newWildcardVersion = "8.1.*"
# 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
Expand All @@ -27,11 +29,18 @@ foreach ($file in $csprojFiles) {
$content = Get-Content -Path $file.FullName

# Update the version of cloudscribe package references, except for cloudscribe.HtmlAgilityPack and cloudscribe.DbHelpers
$updatedContent = $content -replace '(?<=<PackageReference Include="cloudscribe\.(?!HtmlAgilityPack|DbHelpers)[^"]+" Version=")8\.0\.\*', $newWildcardVersion
$updatedContent = $updatedContent -replace '(?<=<PackageReference Include="cloudscribe\.(?!HtmlAgilityPack|DbHelpers)[^"]+" Version=")8\.0\.\d+', $newVersion

$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

# Update the <Version> element if it matches the 8.0.* pattern
$updatedContent = $updatedContent -replace '<Version>8\.0\.\d+</Version>', "<Version>$newVersion</Version>"

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