-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit * added Dependabot * initial commit
- Loading branch information
1 parent
6d5fedf
commit 96f9898
Showing
22 changed files
with
374 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "11:00" | ||
|
||
- package-ecosystem: nuget | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "11:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: pr_validation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test-${{matrix.os}} | ||
runs-on: ${{matrix.os}} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/[email protected] | ||
with: | ||
lfs: true | ||
fetch-depth: 0 | ||
|
||
- name: "Install .NET SDK" | ||
uses: actions/[email protected] | ||
with: | ||
global-json-file: "./global.json" | ||
|
||
- name: "dotnet build" | ||
run: dotnet build -c Release | ||
|
||
- name: "dotnet test" | ||
run: dotnet test -c Release |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{30006747-5ED8-4FAE-8444-C267675556C7}" | ||
ProjectSection(SolutionItems) = preProject | ||
global.json = global.json | ||
build.ps1 = build.ps1 | ||
README.md = README.md | ||
RELEASE_NOTES.md = RELEASE_NOTES.md | ||
src\Directory.Build.props = src\Directory.Build.props | ||
src\Directory.Packages.props = src\Directory.Packages.props | ||
src\NuGet.config = src\NuGet.config | ||
EndProjectSection | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinkValidator", "src\LinkValidator\LinkValidator.csproj", "{735F5CB0-2BD5-4BE4-86FF-794EF5519E78}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{735F5CB0-2BD5-4BE4-86FF-794EF5519E78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{735F5CB0-2BD5-4BE4-86FF-794EF5519E78}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{735F5CB0-2BD5-4BE4-86FF-794EF5519E78}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{735F5CB0-2BD5-4BE4-86FF-794EF5519E78}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#### 0.1.0 Januard 3rd 2025 #### | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
. "$PSScriptRoot\scripts\getReleaseNotes.ps1" | ||
. "$PSScriptRoot\scripts\bumpVersion.ps1" | ||
|
||
###################################################################### | ||
# Step 1: Grab release notes and update solution metadata | ||
###################################################################### | ||
$releaseNotes = Get-ReleaseNotes -MarkdownFile (Join-Path -Path $PSScriptRoot -ChildPath "RELEASE_NOTES.md") | ||
|
||
# inject release notes into Directory.Build.props | ||
$directoryBuildPropsPath = Join-Path -Path $PSScriptRoot -ChildPath "src" | ||
$directoryBuildPropsPath = Join-Path -Path $directoryBuildPropsPath -ChildPath "Directory.Build.props" | ||
|
||
UpdateVersionAndReleaseNotes -ReleaseNotesResult $releaseNotes -XmlFilePath $directoryBuildPropsPath | ||
|
||
Write-Output "Added release notes $releaseNotes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"rollForward": "latestMinor", | ||
"version": "9.0.101" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
function UpdateVersionAndReleaseNotes { | ||
param ( | ||
[Parameter(Mandatory=$true)] | ||
[PSCustomObject]$ReleaseNotesResult, | ||
|
||
[Parameter(Mandatory=$true)] | ||
[string]$XmlFilePath | ||
) | ||
|
||
# Load XML | ||
$xmlContent = New-Object XML | ||
$xmlContent.Load($XmlFilePath) | ||
|
||
# Update VersionPrefix and PackageReleaseNotes | ||
$versionPrefixElement = $xmlContent.SelectSingleNode("//VersionPrefix") | ||
$versionPrefixElement.InnerText = $ReleaseNotesResult.Version | ||
|
||
$packageReleaseNotesElement = $xmlContent.SelectSingleNode("//PackageReleaseNotes") | ||
$packageReleaseNotesElement.InnerText = $ReleaseNotesResult.ReleaseNotes | ||
|
||
# Save the updated XML | ||
$xmlContent.Save($XmlFilePath) | ||
} | ||
|
||
# Usage example: | ||
# $notes = Get-ReleaseNotes -MarkdownFile "$PSScriptRoot\RELEASE_NOTES.md" | ||
# $propsPath = Join-Path -Path (Get-Item $PSScriptRoot).Parent.FullName -ChildPath "Directory.Build.props" | ||
# UpdateVersionAndReleaseNotes -ReleaseNotesResult $notes -XmlFilePath $propsPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
function Get-ReleaseNotes { | ||
param ( | ||
[Parameter(Mandatory=$true)] | ||
[string]$MarkdownFile | ||
) | ||
|
||
# Read markdown file content | ||
$content = Get-Content -Path $MarkdownFile -Raw | ||
|
||
# Split content based on headers | ||
$sections = $content -split "####" | ||
|
||
# Output object to store result | ||
$outputObject = [PSCustomObject]@{ | ||
Version = $null | ||
Date = $null | ||
ReleaseNotes = $null | ||
} | ||
|
||
# Check if we have at least 3 sections (1. Before the header, 2. Header, 3. Release notes) | ||
if ($sections.Count -ge 3) { | ||
$header = $sections[1].Trim() | ||
$releaseNotes = $sections[2].Trim() | ||
|
||
# Extract version and date from the header | ||
$headerParts = $header -split " ", 2 | ||
if ($headerParts.Count -eq 2) { | ||
$outputObject.Version = $headerParts[0] | ||
$outputObject.Date = $headerParts[1] | ||
} | ||
|
||
$outputObject.ReleaseNotes = $releaseNotes | ||
} | ||
|
||
# Return the output object | ||
return $outputObject | ||
} | ||
|
||
# Call function example: | ||
#$result = Get-ReleaseNotes -MarkdownFile "$PSScriptRoot\RELEASE_NOTES.md" | ||
#Write-Output "Version: $($result.Version)" | ||
#Write-Output "Date: $($result.Date)" | ||
#Write-Output "Release Notes:" | ||
#Write-Output $result.ReleaseNotes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
param( | ||
[string]$ConfigPath, | ||
[string]$UserName, | ||
[string]$Password, | ||
[string]$ProductName, | ||
[string]$ProductDescription, | ||
[string]$ProductUrl, | ||
[string]$DirectoryPath | ||
) | ||
|
||
# Logging the received parameters (optional, for debugging) | ||
Write-Output "Using configuration: $ConfigPath" | ||
Write-Output "Product Name: $ProductName" | ||
Write-Output "Product Description: $ProductDescription" | ||
Write-Output "Product URL: $ProductUrl" | ||
Write-Output "Directory for signing: $DirectoryPath" | ||
|
||
# Validate that the directory exists | ||
if (-Not (Test-Path $DirectoryPath)) { | ||
Write-Error "Directory does not exist: $DirectoryPath" | ||
exit 1 | ||
} | ||
|
||
# Loop over each .nupkg and .snupkg file in the directory | ||
Get-ChildItem -Path $DirectoryPath -Include *.nupkg,*.snupkg -Recurse | ForEach-Object { | ||
$filePath = $_.FullName | ||
|
||
Write-Output "Signing file: $filePath" | ||
|
||
# Define the command and parameters | ||
$command = "SignClient" | ||
$arguments = "--config", $ConfigPath, | ||
"-r", $UserName, | ||
"-s", $Password, | ||
"-n", $ProductName, | ||
"-d", $ProductDescription, | ||
"-u", $ProductUrl, | ||
"-i", $filePath | ||
|
||
# Execute SignClient and capture the output directly | ||
try { | ||
SignClient sign $arguments | ||
if ($LASTEXITCODE -ne 0) { | ||
Write-Error "Failed to sign $filePath." | ||
} | ||
} catch { | ||
Write-Error "An error occurred: $_" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"SignClient": { | ||
"AzureAd": { | ||
"AADInstance": "https://login.microsoftonline.com/", | ||
"ClientId": "1e983f21-9ea5-4f21-ab99-28080225efc9", | ||
"TenantId": "2fa36080-af12-4894-a64b-a17d8f29ec52" | ||
}, | ||
"Service": { | ||
"Url": "https://pb-sign.azurewebsites.net/", | ||
"ResourceId": "https://SignService/eef8e2e7-24b1-4a3b-a73b-a84d66f9abee" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Copyright>Copyright © 2019-2024 Aaron Stannard</Copyright> | ||
<Authors>Aaron Stannard</Authors> | ||
<VersionPrefix>0.1.0</VersionPrefix> | ||
<PackageReleaseNotes>Initial release</PackageReleaseNotes> | ||
<PackageIconUrl> | ||
</PackageIconUrl> | ||
<PackageProjectUrl> | ||
https://github.com/Aaronontheweb/tailscale-pulumi | ||
</PackageProjectUrl> | ||
<PackageLicenseUrl> | ||
</PackageLicenseUrl> | ||
<NoWarn>$(NoWarn);CS1591</NoWarn> | ||
</PropertyGroup> | ||
<PropertyGroup Label="SharedBuildProperties"> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Akka" Version="1.5.33" /> | ||
<PackageVersion Include="HtmlAgilityPack" Version="1.11.72" /> | ||
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace LinkValidator.Actors; | ||
|
||
public record CrawlUrl(string Url); | ||
public record PageCrawled(string Url, int StatusCode, IReadOnlyCollection<string> Links); | ||
public record CrawlComplete(ImmutableDictionary<string, (int StatusCode, string Path)> Results); | ||
|
||
public class CrawlerActor | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Akka.Actor; | ||
|
||
namespace LinkValidator.Actors; | ||
|
||
public sealed class IndexerActor : UntypedActor | ||
{ | ||
protected override void OnReceive(object message) | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Akka" /> | ||
<PackageReference Include="HtmlAgilityPack" /> | ||
<PackageReference Include="System.CommandLine" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace LinkValidator; | ||
|
||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
Console.WriteLine("Hello, World!"); | ||
} | ||
} |
Oops, something went wrong.