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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,7 @@ paket-files/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc

**/*.key
nuget/archive/
2 changes: 1 addition & 1 deletion GoRogue.Docs/articles/howtos/dice-rolling.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ string valid = $"{numberOfDice}d{sidesOnDie}";
Some examples of valid expressions to roll include:
* Roll 3 six-sided dice: `3d6`
* Roll an eight-sided die and add 2 to the result: `1d8+2`
* Roll a twelve-sided die, double the result, and add 3: `d12*2+3`
* Roll a twelve-sided die, double the result, and add 3: `1d12*2+3`
* Roll a twelve-sided die, halve the result, and subtract 1: `1d12/2-1`
* Roll 10 ten-sided die, and only keep the top three: `10d10k3`
* Roll 4 six-sided die, add 1 to the entire roll, and only keep the top three: `4d6+1k3`
Expand Down
5 changes: 1 addition & 4 deletions GoRogue.Docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
"disableGitFeatures": false,
"xref": [
"https://thesadrogue.github.io/TheSadRogue.Primitives/xrefmap.yml"
],
"xrefService": [
"https://xref.docs.microsoft.com/query?uid={uid}"
],
]
}
}
6 changes: 3 additions & 3 deletions GoRogue/GoRogue.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Basic package info -->
<TargetFrameworks>net5.0;net6.0;net7.0;net8.0;netcoreapp3.1;netstandard2.1;net9.0</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0;net8.0;;net9.0;netcoreapp3.1;netstandard2.1</TargetFrameworks>
<RootNamespace>GoRogue</RootNamespace>
<Authors>Chris3606</Authors>
<Copyright>Copyright © 2023 Christopher Ridley (Chris3606)</Copyright>
<Copyright>Copyright © 2025 Christopher Ridley (Chris3606)</Copyright>
<Description>Roguelike/2D game utility library.</Description>

<!--
Configure versioning information, making sure to append "debug" to Debug version to allow publishing
to NuGet seperately from Release version.
-->
<Version>3.0.0-beta09</Version>
<Version>3.0.0-beta10</Version>
<Version Condition="'$(Configuration)'=='Debug'">$(Version)-debug</Version>

<!-- More nuget package settings-->
Expand Down
434 changes: 0 additions & 434 deletions changelog.md

This file was deleted.

65 changes: 65 additions & 0 deletions nuget/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Configuration
$scriptDir = $PSScriptRoot
$rootDir = Join-Path $scriptDir ".."
$archive = Join-Path $scriptDir archive
$corePackage = "GoRogue"
$nugetKeyPath = Join-Path $scriptDir "nuget.key"

# Delete any NuGet packages not moved to archive
Write-Output "Removing old nupkg files"
Remove-Item "$scriptDir\*.nupkg","$scriptDir\*.snupkg" -Force

# Make sure archive directory exists
if(!(Test-Path $archive))
{
New-Item -Path $archive -ItemType Directory -Force | Out-Null
}

# Build core package
Write-Output "Building $corePackage Debug and Release"
$output = Invoke-Expression "dotnet build $rootDir\$corePackage\$corePackage.csproj -c Debug --no-cache"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
$output = Invoke-Expression "dotnet build $rootDir\$corePackage\$corePackage.csproj -c Release --no-cache"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }

# Find the version we're using
$version = (Get-Content $rootDir\$corePackage\$corePackage.csproj | Select-String "<Version>(.*)<").Matches[0].Groups[1].Value
$nugetKey = Get-Content $nugetKeyPath
Write-Output "Target $coreProjectVersion version is $version"

# Push packages to nuget
Write-Output "Pushing $corePackage packages"
$corePackages = Get-ChildItem "$corePackage.*.nupkg" | Select-Object -ExpandProperty Name

foreach ($package in $corePackages) {
$output = Invoke-Expression "dotnet nuget push `"$package`" -s nuget.org -k $nugetKey --skip-duplicate"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
}

Write-Output "Query NuGet for 10 minutes to find the new package"

$timeout = New-TimeSpan -Minutes 10
$timer = [Diagnostics.StopWatch]::StartNew()
[Boolean]$foundPackage = $false

# Loop searching for the new package
while ($timer.elapsed -lt $timeout){

$existingVersions = (Invoke-WebRequest "https://api-v2v3search-0.nuget.org/query?q=PackageId:$corePackage&prerelease=true").Content | ConvertFrom-Json

if ($existingVersions.totalHits -eq 0) {
throw "Unable to get any results from NuGet"
}

if ($null -eq ($existingVersions.data.versions | Where-Object version -eq $version)) {
Write-Output "Waiting 30 seconds to retry..."
Start-Sleep -Seconds 30

}
else {
Write-Output "Found package! Deployment successful."
$foundPackage = $true
break
}
}

if (!$foundPackage) {
Write-Error "$corePackage didn't appear on NuGet within 10 minutes."
}
2 changes: 0 additions & 2 deletions nuget/push.bat

This file was deleted.