Skip to content

Commit 30a3731

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Update create-pull-request action to version 8 devlooped/oss@0662872 - Revert indent size for project files devlooped/oss@a62c459 - Improve default Product metadata, remove .git from user-facing URLs devlooped/oss@4339749 - Ignore .env files recursively devlooped/oss@3776526 - Enable package pruning in Directory.Build.props devlooped/oss@0ff8b7b - Ensure dnx run succeeds even on Windows devlooped/oss@7f5f9ee - Update branches for push event in build.yml devlooped/oss@5da103c # devlooped/catbag - Fix compilation error in Sixel support, update ImageSharp devlooped/catbag@676dcef
1 parent ac07b91 commit 30a3731

9 files changed

Lines changed: 84 additions & 37 deletions

File tree

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ indent_size = 2
3030

3131
# Dotnet code style settings:
3232
[*.{cs,vb}]
33+
tab_width = 4
34+
3335
# Sort using and Import directives with System.* appearing first
3436
dotnet_sort_system_directives_first = true
3537
# Avoid "this." and "Me." if not necessary
@@ -57,6 +59,9 @@ dotnet_style_require_accessibility_modifiers = omit_if_default:error
5759
# IDE0040: Add accessibility modifiers
5860
dotnet_diagnostic.IDE0040.severity = error
5961

62+
# IDE1100: Error reading content of source file 'Project.TargetFrameworkMoniker' (i.e. from ThisAssembly)
63+
dotnet_diagnostic.IDE1100.severity = none
64+
6065
[*.cs]
6166
# Top-level files are definitely OK
6267
csharp_using_directive_placement = outside_namespace:silent

.github/workflows/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- Release
1313
- Debug
1414
push:
15-
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
15+
branches: [ main, 'feature/*', 'rel/*' ]
1616
paths-ignore:
1717
- changelog.md
1818
- readme.md
@@ -72,9 +72,8 @@ jobs:
7272
run: dotnet build -m:1 -bl:build.binlog
7373

7474
- name: 🧪 test
75-
run: |
76-
dotnet tool update -g dotnet-retest
77-
dotnet retest -- --no-build
75+
shell: pwsh
76+
run: dnx --yes retest -- --no-build
7877

7978
- name: 🐛 logs
8079
uses: actions/upload-artifact@v4

.github/workflows/includes.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ on:
55
branches:
66
- 'main'
77
paths:
8-
- '**.md'
8+
- '**.md'
99
- '!changelog.md'
10+
- 'osmfeula.txt'
1011

1112
jobs:
1213
includes:
@@ -31,14 +32,33 @@ jobs:
3132
- name: +Mᐁ includes
3233
uses: devlooped/actions-includes@v1
3334

35+
- name: 📝 OSMF EULA
36+
shell: pwsh
37+
run: |
38+
$file = "osmfeula.txt"
39+
$props = "src/Directory.Build.props"
40+
if (-not (test-path $file) -or -not (test-path $props)) {
41+
exit 0
42+
}
43+
44+
$product = dotnet msbuild $props -getproperty:Product
45+
if (-not $product) {
46+
write-error 'To use OSMF EULA, ensure the $(Product) property is set in Directory.props'
47+
exit 1
48+
}
49+
50+
((get-content -raw $file) -replace '\$product\$',$product).trim() | set-content $file
51+
3452
- name: ✍ pull request
35-
uses: peter-evans/create-pull-request@v6
53+
uses: peter-evans/create-pull-request@v8
3654
with:
37-
add-paths: '**.md'
55+
add-paths: |
56+
**.md
57+
*.txt
3858
base: main
3959
branch: markdown-includes
4060
delete-branch: true
41-
labels: docs
61+
labels: dependencies
4262
author: ${{ env.BOT_AUTHOR }}
4363
committer: ${{ env.BOT_AUTHOR }}
4464
commit-message: +Mᐁ includes

.github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ jobs:
3434
run: dotnet build -m:1 -bl:build.binlog
3535

3636
- name: 🧪 test
37-
run: |
38-
dotnet tool update -g dotnet-retest
39-
dotnet retest -- --no-build
37+
shell: pwsh
38+
run: dnx --yes retest -- --no-build
4039

4140
- name: 🐛 logs
4241
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ BenchmarkDotNet.Artifacts
1111
.genaiscript
1212
.idea
1313
local.settings.json
14+
.env
1415

1516
*.suo
1617
*.sdf

.netconfig

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
skip
1818
[file ".editorconfig"]
1919
url = https://github.com/devlooped/oss/blob/main/.editorconfig
20-
sha = e81ab754b366d52d92bd69b24bef1d5b1c610634
20+
sha = a62c45934ac2952f2f5d54d8aea4a7ebc1babaff
2121

22-
etag = 7298c6450967975a8782b5c74f3071e1910fc59686e48f9c9d5cd7c68213cf59
22+
etag = b5e919b472a52d4b522f86494f0f2c0ba74a6d9601454e20e4cbaf744317ff62
2323
weak
2424
[file ".gitattributes"]
2525
url = https://github.com/devlooped/oss/blob/main/.gitattributes
@@ -47,9 +47,9 @@
4747
weak
4848
[file ".github/workflows/build.yml"]
4949
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
50-
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
50+
sha = 5da103cfbc1c4f9b5f59cfa698d2afbd744a7525
5151

52-
etag = bf99c19427f4372ecfe38ec56aa8c411058684fb717da5661f17ac00388b3602
52+
etag = 851af098748f7cfa5bc3cfd4cc404a6de930532b59ceb2b3b535282c41226f3a
5353
weak
5454
[file ".github/workflows/changelog.config"]
5555
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config
@@ -77,15 +77,15 @@
7777
weak
7878
[file ".github/workflows/includes.yml"]
7979
url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml
80-
sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de
80+
sha = 06628725a6303bb8c4cf3076a384fc982a91bc0b
8181

82-
etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee
82+
etag = 478f91d4126230e57cc601382da1ba23f9daa054645b4af89800d8dd862e64fd
8383
weak
8484
[file ".github/workflows/publish.yml"]
8585
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
86-
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
86+
sha = 7f5f9ee9f362f7e8f951d618f8f799033550e687
8787

88-
etag = 2ef43521627aa3a91dd55bdc2856ec0c6a93b42485d4fe9d6b181f9ee42c8e18
88+
etag = c60411d1aa4e98e7f69e2d34cbccb8eb7e387ec11f6f8e78ee8d8b92122d7025
8989
weak
9090
[file ".github/workflows/triage.yml"]
9191
url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml
@@ -95,9 +95,9 @@
9595
weak
9696
[file ".gitignore"]
9797
url = https://github.com/devlooped/oss/blob/main/.gitignore
98-
sha = e0be248fff1d39133345283b8227372b36574b75
98+
sha = 3776526342afb3f57da7e80f2095e5fdca3c31c9
9999

100-
etag = c449ec6f76803e1891357ca2b8b4fcb5b2e5deeff8311622fd92ca9fbf1e6575
100+
etag = 11767f73556aa4c6c8bcc153b77ee8e8114f99fa3b885b0a7d66d082f91e77b3
101101
weak
102102
[file "Directory.Build.rsp"]
103103
url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp
@@ -125,15 +125,15 @@
125125
weak
126126
[file "src/Directory.Build.props"]
127127
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
128-
sha = 81d972fd0760c244d134dae7f4b17d6c43cb004a
128+
sha = 0ff8b7b79a82112678326d1dc5543ed890311366
129129

130-
etag = 1368697c1521e465a1dea88b93787b1c7def441c37d62afc903fb8d07179e4f6
130+
etag = 3ebde0a8630d526b80f15801179116e17a857ff880a4442e7db7b075efa4fd63
131131
weak
132132
[file "src/Directory.Build.targets"]
133133
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
134-
sha = a8b208093599263b7f2d1fe3854634c588ea5199
134+
sha = 4339749ef4b8f66def75931df09ef99c149f8421
135135

136-
etag = 19087699f05396205e6b050d999a43b175bd242f6e8fac86f6df936310178b03
136+
etag = 8b4492765755c030c4c351e058a92f53ab493cab440c1c0ef431f6635c4dae0e
137137
weak
138138
[file "src/nuget.config"]
139139
url = https://github.com/devlooped/oss/blob/main/src/nuget.config
@@ -143,7 +143,7 @@
143143
weak
144144
[file "src/Grok/Extensions/Sixel.cs"]
145145
url = https://github.com/devlooped/catbag/blob/main/SixLabors/ImageSharp/Sixel.cs
146-
sha = 46a33c3c89b7a81b5d58899a1fabbc6ad23c4cc0
146+
sha = 676dcef14a36b89cbc40b93c70b44e1123f38b4f
147147

148-
etag = 51aba06224650c9317d075c87335c63e9e753c2c829903deb92df860bcffbbaa
148+
etag = e1474f427057d30179478702f7d37ee74ef7e194705707dfa10f29790e5846cb
149149
weak

src/Directory.Build.props

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project>
1+
<Project TreatAsLocalProperty="VersionPrefix">
22
<!-- To extend/change the defaults, create a Directory.props alongside this file -->
33

44
<PropertyGroup Label="CI" Condition="'$(CI)' == ''">
@@ -20,6 +20,7 @@
2020

2121
<PropertyGroup Label="NuGet">
2222
<Authors>Daniel Cazzulino</Authors>
23+
<Company>Devlooped</Company>
2324
<Copyright>Copyright (C) Daniel Cazzulino and Contributors. All rights reserved.</Copyright>
2425
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2526
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -42,6 +43,10 @@
4243

4344
<!-- Ensure MSBuild tooling can access package artifacts always via PKG_[PackageId] -->
4445
<GeneratePathProperty>true</GeneratePathProperty>
46+
<!-- Avoid warnings for test projects when we run dotnet pack on the whole solution. -->
47+
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
48+
<!-- See https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#prunepackagereference-specification -->
49+
<RestoreEnablePackagePruning>true</RestoreEnablePackagePruning>
4550
</PropertyGroup>
4651

4752
<PropertyGroup Label="Build">
@@ -133,6 +138,15 @@
133138
<VersionSuffix Condition="!$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</VersionSuffix>
134139
<!-- Special case for tags, the label is actually the version. Backs compat since passed-in value overrides MSBuild-set one -->
135140
<Version Condition="$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</Version>
141+
142+
<!-- In order for latest from main/master to always be greatest when using -prerelease switch on install/run,
143+
we change the scheme as follows:
144+
- main/master remain as today: VersionPrefix: 42.42.${{ github.run_number }} (from yaml)
145+
- others: VersionPrefix: 42.42.0-[label].${{ github.run_number }}
146+
-->
147+
<IsMaster Condition="$(VersionLabel.Contains('refs/heads/main')) or $(VersionLabel.Contains('refs/heads/master'))">true</IsMaster>
148+
<VersionPrefix Condition="'$(IsMaster)' != 'true'">42.42.0</VersionPrefix>
149+
<VersionSuffix Condition="'$(IsMaster)' != 'true'">$(VersionSuffix).$(GITHUB_RUN_NUMBER)</VersionSuffix>
136150
</PropertyGroup>
137151

138152
<ItemGroup Label="ThisAssembly.Project">

src/Directory.Build.targets

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@
165165

166166
<PropertyGroup>
167167
<RepositoryRoot>@(_GitSourceRoot)</RepositoryRoot>
168+
<!-- Only change if it wasn't just the default from Microsoft.NET.DefaultAssemblyInfo.targets -->
169+
<ProductFromUrl Condition="'$(SourceControlInformationFeatureSupported)' == 'true'">$([System.IO.Path]::GetFileNameWithoutExtension($(PrivateRepositoryUrl)))</ProductFromUrl>
170+
<Product Condition="'$(Product)' == '$(AssemblyName)' and '$(ProductFromUrl)' != ''">$(ProductFromUrl)</Product>
168171
</PropertyGroup>
169172

170173
</Target>
@@ -175,9 +178,9 @@
175178
Condition="'$(SourceControlInformationFeatureSupported)' == 'true' And
176179
'$(IsPackable)' == 'true'">
177180
<PropertyGroup>
178-
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == '' and '$(PublishRepositoryUrl)' == 'true'">$(RepositoryUrl)</PackageProjectUrl>
181+
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == '' and '$(PublishRepositoryUrl)' == 'true'">$(RepositoryUrl.Replace('.git', ''))</PackageProjectUrl>
179182
<PackageDescription>$(Description)</PackageDescription>
180-
<PackageReleaseNotes Condition="'$(RepositoryUrl)' != '' and Exists('$(MSBuildThisFileDirectory)..\changelog.md')">$(RepositoryUrl)/blob/main/changelog.md</PackageReleaseNotes>
183+
<PackageReleaseNotes Condition="'$(RepositoryUrl)' != '' and Exists('$(MSBuildThisFileDirectory)..\changelog.md')">$(RepositoryUrl.Replace('.git', ''))/blob/main/changelog.md</PackageReleaseNotes>
181184
</PropertyGroup>
182185
</Target>
183186

src/Grok/Extensions/Sixel.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using System;
2727
using System.Buffers;
2828
using System.Collections.Generic;
29+
using System.ComponentModel;
2930
using System.Diagnostics;
3031
using System.Text;
3132
using System.Threading;
@@ -39,16 +40,11 @@ namespace SixLabors.ImageSharp;
3940
/// Provides methods for converting images to Sixel format, which is a bitmap graphics format used
4041
/// to render images directly in the terminal.
4142
/// </summary>
42-
public static class Sixel
43+
static partial class Sixel
4344
{
44-
const byte Cutoff = 127;
45-
const string Prelude = "\x1BP7;1;q";
46-
const string Epilogue = "\x1B\\";
47-
4845
/// <summary>
4946
/// Detects if the terminal supports sixel graphics.
5047
/// </summary>
51-
/// <returns></returns>
5248
public static bool DetectSupport()
5349
{
5450
// Use console capabilities to check for sixel support
@@ -71,8 +67,18 @@ public static bool DetectSupport()
7167
/// on the image.
7268
/// </summary>
7369
/// <param name="image"></param>
74-
/// <returns></returns>
7570
public static string FromImage(Image<Rgba32> image) => image.ToSixel();
71+
}
72+
73+
/// <summary>
74+
/// Provides extension methods for working with Sixel.
75+
/// </summary>
76+
[EditorBrowsable(EditorBrowsableState.Never)]
77+
static partial class SixelExtensions
78+
{
79+
const byte Cutoff = 127;
80+
const string Prelude = "\x1BP7;1;q";
81+
const string Epilogue = "\x1B\\";
7682

7783
extension(Image<Rgba32> image)
7884
{

0 commit comments

Comments
 (0)