Skip to content

Commit

Permalink
feat: rebrand from VocaDb, since they put theirs in deprecated mode
Browse files Browse the repository at this point in the history
  • Loading branch information
davhdavh committed Oct 27, 2023
1 parent 6a820dc commit 8129ef0
Show file tree
Hide file tree
Showing 78 changed files with 9,961 additions and 3,238 deletions.
86 changes: 86 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:best-practices",
"schedule:weekends",
":semanticCommits"
],
"prConcurrentLimit": 0,
"prHourlyLimit": 2,
"suppressNotifications": [
"prIgnoreNotification"
],
"postUpdateOptions": [
"helmUpdateSubChartArchives"
],
"separateMajorMinor": true,
"kubernetes": {
"fileMatch": "\\.yaml$"
},
"customManagers": [
{
"customType": "regex",
"fileMatch": [
"(^|/|\\.)[dD]ockerfile$"
],
"matchStrings": [
"datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+ENV .*?_VERSION[=\\s](?<currentValue>.*)\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
},
{
"customType": "regex",
"fileMatch": [
"(^|/|\\.)values\\.yaml$"
],
"matchStrings": [
"datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+tag:\\s*(?<currentValue>.*)\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
},
{
"customType": "regex",
"fileMatch": [
"(^|/|\\.)[dD]ockerfile$"
],
"matchStrings": [
"ARG IMAGE=(?<depName>.*?):(?<currentValue>.*?)(@(?<currentDigest>sha256:[a-f0-9]+))?\\s"
],
"datasourceTemplate": "docker"
}
],
"packageRules": [
{
"matchPackageNames": [
"catglobe"
],
"enabled": false
},
{
"matchPackageNames": [
"windows"
],
"matchCurrentVersion": "2019",
"enabled": false
},
{
"matchManagers": [
"helmv3"
],
"matchUpdateTypes": [
"pin",
"digest",
"pinDigest"
],
"enabled": false
},
{
"matchFileNames": [
"docker-images/**",
".github/workflows/**"
],
"automerge": true,
"automergeType": "branch"
}
]
}
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release
on:
workflow_dispatch:
push:
branches:
- main

permissions:
contents: read
packages: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
packages: write # to be able to make package releases
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
cache: npm
node-version: 'lts/*'
- name: Install dependencies
run: npm clean-install
- name: Test
run: dotnet test
- name: Release
working-directory: Catglobe.ResXFileCodeGenerator
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
44 changes: 44 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"defaultBranch": "main",
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@droidsolutions-oss/semantic-release-update-file",
{
"files": [
{
"path": [ "Catglobe.ResXFileCodeGenerator/Catglobe.ResXFileCodeGenerator.csproj" ],
"type": "xml",
"replacements": [
{ "key": "Version", "value": "${nextRelease.version}" },
{ "key": "RepositoryCommit", "value": "${nextRelease.gitHead}" }
]
}
]
}
],
[
"@droidsolutions-oss/semantic-release-nuget",
{
"projectPath": "Catglobe.ResXFileCodeGenerator/Catglobe.ResXFileCodeGenerator.csproj",
"nugetServer": "https://api.nuget.org/v3/index.json"
}
],
"@semantic-release/github"
]
}
19 changes: 19 additions & 0 deletions Catglobe.ResXFileCodeGenerator.Tests/AdditionalTextStub.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;

namespace Catglobe.ResXFileCodeGenerator.Tests;

internal class AdditionalTextStub : AdditionalText
{
private readonly SourceText? _text;

public override string Path { get; }

public AdditionalTextStub(string path, string? text = null)
{
_text = text is null ? null : SourceText.From(text);
Path = path;
}

public override SourceText? GetText(CancellationToken cancellationToken = new()) => _text;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -8,22 +8,22 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<Import Project="../VocaDb.ResXFileCodeGenerator/build/VocaDb.ResXFileCodeGenerator.props"/>
<Import Project="../Catglobe.ResXFileCodeGenerator/build/Catglobe.ResXFileCodeGenerator.props" />

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3">
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand All @@ -33,11 +33,11 @@
<DependentUpon>$([System.IO.Path]::GetFileNameWithoutExtension('%(FileName)')).resx</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="IntegrationTests\Test2.resx">
<UseVocaDbResManager>true</UseVocaDbResManager>
<UseResManager>true</UseResManager>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\VocaDb.ResXFileCodeGenerator\VocaDb.ResXFileCodeGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
<ProjectReference Include="..\Catglobe.ResXFileCodeGenerator\Catglobe.ResXFileCodeGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
</ItemGroup>
</Project>
Loading

0 comments on commit 8129ef0

Please sign in to comment.