Skip to content

Commit 592f637

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Disable warnings for non-packable test projects devlooped/oss@95b338b - Update versioning scheme in Directory.Build.props devlooped/oss@f2400ef - Enable package pruning in Directory.Build.props devlooped/oss@0ff8b7b - Switch to dnx retest shorthand devlooped/oss@fddfd89 - Ensure quiet confirmation of tool download/install devlooped/oss@e11b002 - Ensure dnx run succeeds even on Windows devlooped/oss@7f5f9ee - Ignore *.local recursively devlooped/oss@a225b7a - Enhance include workflow with OSMF EULA support devlooped/oss@f2050db - Trim whitespace in file content replacement devlooped/oss@e53557f - Fix path pattern for markdown files in workflow devlooped/oss@6a6de05 - Fix error message quotes in includes.yml devlooped/oss@26e8cb7 - Change label from 'docs' to 'dependencies' devlooped/oss@2d1fb4e - Update branches for push event in build.yml devlooped/oss@5da103c - Avoid failure on PR creation if osmfeula.txt doesn't exist in repo devlooped/oss@8ff5178 - Update create-pull-request action to version 8 devlooped/oss@0662872
1 parent c8754fb commit 592f637

File tree

8 files changed

+96
-59
lines changed

8 files changed

+96
-59
lines changed

.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
@@ -12,6 +12,7 @@ BenchmarkDotNet.Artifacts
1212
.idea
1313
local.settings.json
1414
.env
15+
*.local
1516

1617
*.suo
1718
*.sdf

.netconfig

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,34 @@
1717
skip
1818
[file "src/Directory.Build.props"]
1919
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
20-
etag = cbbdc1a4d3030f353f3e5306a6c380238dd4ed0945aad2d56ba87b49fcfcd66d
20+
etag = 3ebde0a8630d526b80f15801179116e17a857ff880a4442e7db7b075efa4fd63
2121
weak
22-
sha = c509be4378ff6789df4f66338cb88119453c0975
22+
sha = 0ff8b7b79a82112678326d1dc5543ed890311366
2323
[file "src/Directory.Build.targets"]
2424
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
2525
etag = 8b4492765755c030c4c351e058a92f53ab493cab440c1c0ef431f6635c4dae0e
2626
weak
2727
sha = 4339749ef4b8f66def75931df09ef99c149f8421
2828
[file ".editorconfig"]
2929
url = https://github.com/devlooped/oss/blob/main/.editorconfig
30-
etag = 7298c6450967975a8782b5c74f3071e1910fc59686e48f9c9d5cd7c68213cf59
30+
etag = b5e919b472a52d4b522f86494f0f2c0ba74a6d9601454e20e4cbaf744317ff62
3131
weak
32-
sha = e81ab754b366d52d92bd69b24bef1d5b1c610634
32+
sha = a62c45934ac2952f2f5d54d8aea4a7ebc1babaff
3333
[file ".gitattributes"]
3434
url = https://github.com/devlooped/oss/blob/main/.gitattributes
3535
etag = 09cad18280ed04b67f7f87591e5481510df04d44c3403231b8af885664d8fd58
3636
weak
3737
sha = 4a9aa321c4982b83c185cf8dffed181ff84667d5
3838
[file ".gitignore"]
3939
url = https://github.com/devlooped/oss/blob/main/.gitignore
40-
etag = 11767f73556aa4c6c8bcc153b77ee8e8114f99fa3b885b0a7d66d082f91e77b3
40+
etag = 20a8b49d57024abbd85aac5b0020c30e5eb68e0384b2761e93727c8780c4a991
4141
weak
42-
sha = 3776526342afb3f57da7e80f2095e5fdca3c31c9
42+
sha = a225b7a9f609f26bcc24e0d84f663387be251a7d
4343
[file ".github/workflows/build.yml"]
4444
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
45-
etag = bf99c19427f4372ecfe38ec56aa8c411058684fb717da5661f17ac00388b3602
45+
etag = 851af098748f7cfa5bc3cfd4cc404a6de930532b59ceb2b3b535282c41226f3a
4646
weak
47-
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
47+
sha = 5da103cfbc1c4f9b5f59cfa698d2afbd744a7525
4848
[file ".github/workflows/dotnet-file.yml"]
4949
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml
5050
etag = 1ca805a23656e99c03f9d478dba8ccef6e571f5de2ac0e9bb7e3c5216c99a694
@@ -72,8 +72,8 @@
7272
sha = 9db26e2710b084d219d6355339d822f159bf5780
7373
[file ".github/workflows/includes.yml"]
7474
url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml
75-
sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de
76-
etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee
75+
sha = 06628725a6303bb8c4cf3076a384fc982a91bc0b
76+
etag = 478f91d4126230e57cc601382da1ba23f9daa054645b4af89800d8dd862e64fd
7777
weak
7878
[file ".github/workflows/changelog.config"]
7979
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config
@@ -87,8 +87,8 @@
8787
weak
8888
[file ".github/workflows/publish.yml"]
8989
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
90-
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
91-
etag = 2ef43521627aa3a91dd55bdc2856ec0c6a93b42485d4fe9d6b181f9ee42c8e18
90+
sha = 7f5f9ee9f362f7e8f951d618f8f799033550e687
91+
etag = c60411d1aa4e98e7f69e2d34cbccb8eb7e387ec11f6f8e78ee8d8b92122d7025
9292
weak
9393
[file ".github/actions/dotnet/action.yml"]
9494
url = https://github.com/devlooped/oss/blob/main/.github/actions/dotnet/action.yml
@@ -125,3 +125,9 @@
125125
sha = 77e83f238196d2723640abef0c7b6f43994f9747
126126
etag = fcb9759a96966df40dcd24906fd328ddec05953b7e747a6bb8d0d1e4c3865274
127127
weak
128+
[file "readme.tmp.md"]
129+
url = https://github.com/devlooped/oss/blob/main/readme.tmp.md
130+
skip
131+
[file "oss.cs"]
132+
url = https://github.com/devlooped/oss/blob/main/oss.cs
133+
skip

readme.md

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -148,44 +148,38 @@ OPTIONS:
148148
# Sponsors
149149
150150
<!-- sponsors.md -->
151-
[![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png "Clarius Org")](https://github.com/clarius)
152-
[![MFB Technologies, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MFB-Technologies-Inc.png "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc)
153-
[![Torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png "Torutek")](https://github.com/torutek-gh)
154-
[![DRIVE.NET, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/drivenet.png "DRIVE.NET, Inc.")](https://github.com/drivenet)
155-
[![Keith Pickford](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Keflon.png "Keith Pickford")](https://github.com/Keflon)
156-
[![Thomas Bolon](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tbolon.png "Thomas Bolon")](https://github.com/tbolon)
157-
[![Kori Francis](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/kfrancis.png "Kori Francis")](https://github.com/kfrancis)
158-
[![Toni Wenzel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/twenzel.png "Toni Wenzel")](https://github.com/twenzel)
159-
[![Uno Platform](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/unoplatform.png "Uno Platform")](https://github.com/unoplatform)
160-
[![Reuben Swartz](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/rbnswartz.png "Reuben Swartz")](https://github.com/rbnswartz)
161-
[![Jacob Foshee](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jfoshee.png "Jacob Foshee")](https://github.com/jfoshee)
162-
[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Mrxx99.png "")](https://github.com/Mrxx99)
163-
[![Eric Johnson](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/eajhnsn1.png "Eric Johnson")](https://github.com/eajhnsn1)
164-
[![David JENNI](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/davidjenni.png "David JENNI")](https://github.com/davidjenni)
165-
[![Jonathan ](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Jonathan-Hickey.png "Jonathan ")](https://github.com/Jonathan-Hickey)
166-
[![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png "Charley Wu")](https://github.com/akunzai)
167-
[![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny)
168-
[![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp)
169-
[![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu)
170-
[![Zheyu Shen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/arsdragonfly.png "Zheyu Shen")](https://github.com/arsdragonfly)
171-
[![Vezel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/vezel-dev.png "Vezel")](https://github.com/vezel-dev)
172-
[![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png "ChilliCream")](https://github.com/ChilliCream)
173-
[![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC)
174-
[![Vincent Limo](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/v-limo.png "Vincent Limo")](https://github.com/v-limo)
175-
[![Jordan S. Jones](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jordansjones.png "Jordan S. Jones")](https://github.com/jordansjones)
176-
[![domischell](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/DominicSchell.png "domischell")](https://github.com/DominicSchell)
177-
[![Justin Wendlandt](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jwendl.png "Justin Wendlandt")](https://github.com/jwendl)
178-
[![Adrian Alonso](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/adalon.png "Adrian Alonso")](https://github.com/adalon)
179-
[![Michael Hagedorn](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Eule02.png "Michael Hagedorn")](https://github.com/Eule02)
180-
[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/henkmartijn.png "")](https://github.com/henkmartijn)
181-
[![Sebastien Lebreton](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sailro.png "Sebastien Lebreton")](https://github.com/sailro)
182-
[![torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek.png "torutek")](https://github.com/torutek)
151+
[![Clarius Org](https://avatars.githubusercontent.com/u/71888636?v=4&s=39 "Clarius Org")](https://github.com/clarius)
152+
[![MFB Technologies, Inc.](https://avatars.githubusercontent.com/u/87181630?v=4&s=39 "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc)
153+
[![Khamza Davletov](https://avatars.githubusercontent.com/u/13615108?u=11b0038e255cdf9d1940fbb9ae9d1d57115697ab&v=4&s=39 "Khamza Davletov")](https://github.com/khamza85)
154+
[![SandRock](https://avatars.githubusercontent.com/u/321868?u=99e50a714276c43ae820632f1da88cb71632ec97&v=4&s=39 "SandRock")](https://github.com/sandrock)
155+
[![DRIVE.NET, Inc.](https://avatars.githubusercontent.com/u/15047123?v=4&s=39 "DRIVE.NET, Inc.")](https://github.com/drivenet)
156+
[![Keith Pickford](https://avatars.githubusercontent.com/u/16598898?u=64416b80caf7092a885f60bb31612270bffc9598&v=4&s=39 "Keith Pickford")](https://github.com/Keflon)
157+
[![Thomas Bolon](https://avatars.githubusercontent.com/u/127185?u=7f50babfc888675e37feb80851a4e9708f573386&v=4&s=39 "Thomas Bolon")](https://github.com/tbolon)
158+
[![Kori Francis](https://avatars.githubusercontent.com/u/67574?u=3991fb983e1c399edf39aebc00a9f9cd425703bd&v=4&s=39 "Kori Francis")](https://github.com/kfrancis)
159+
[![Uno Platform](https://avatars.githubusercontent.com/u/52228309?v=4&s=39 "Uno Platform")](https://github.com/unoplatform)
160+
[![Reuben Swartz](https://avatars.githubusercontent.com/u/724704?u=2076fe336f9f6ad678009f1595cbea434b0c5a41&v=4&s=39 "Reuben Swartz")](https://github.com/rbnswartz)
161+
[![Jacob Foshee](https://avatars.githubusercontent.com/u/480334?v=4&s=39 "Jacob Foshee")](https://github.com/jfoshee)
162+
[![](https://avatars.githubusercontent.com/u/33566379?u=bf62e2b46435a267fa246a64537870fd2449410f&v=4&s=39 "")](https://github.com/Mrxx99)
163+
[![Eric Johnson](https://avatars.githubusercontent.com/u/26369281?u=41b560c2bc493149b32d384b960e0948c78767ab&v=4&s=39 "Eric Johnson")](https://github.com/eajhnsn1)
164+
[![Jonathan ](https://avatars.githubusercontent.com/u/5510103?u=98dcfbef3f32de629d30f1f418a095bf09e14891&v=4&s=39 "Jonathan ")](https://github.com/Jonathan-Hickey)
165+
[![Ken Bonny](https://avatars.githubusercontent.com/u/6417376?u=569af445b6f387917029ffb5129e9cf9f6f68421&v=4&s=39 "Ken Bonny")](https://github.com/KenBonny)
166+
[![Simon Cropp](https://avatars.githubusercontent.com/u/122666?v=4&s=39 "Simon Cropp")](https://github.com/SimonCropp)
167+
[![agileworks-eu](https://avatars.githubusercontent.com/u/5989304?v=4&s=39 "agileworks-eu")](https://github.com/agileworks-eu)
168+
[![Zheyu Shen](https://avatars.githubusercontent.com/u/4067473?v=4&s=39 "Zheyu Shen")](https://github.com/arsdragonfly)
169+
[![Vezel](https://avatars.githubusercontent.com/u/87844133?v=4&s=39 "Vezel")](https://github.com/vezel-dev)
170+
[![ChilliCream](https://avatars.githubusercontent.com/u/16239022?v=4&s=39 "ChilliCream")](https://github.com/ChilliCream)
171+
[![4OTC](https://avatars.githubusercontent.com/u/68428092?v=4&s=39 "4OTC")](https://github.com/4OTC)
172+
[![domischell](https://avatars.githubusercontent.com/u/66068846?u=0a5c5e2e7d90f15ea657bc660f175605935c5bea&v=4&s=39 "domischell")](https://github.com/DominicSchell)
173+
[![Adrian Alonso](https://avatars.githubusercontent.com/u/2027083?u=129cf516d99f5cb2fd0f4a0787a069f3446b7522&v=4&s=39 "Adrian Alonso")](https://github.com/adalon)
174+
[![torutek](https://avatars.githubusercontent.com/u/33917059?v=4&s=39 "torutek")](https://github.com/torutek)
175+
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=110034edf51097a5ee82cb6a94ae5483568e3469&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
176+
[![Seika Logiciel](https://avatars.githubusercontent.com/u/2564602?v=4&s=39 "Seika Logiciel")](https://github.com/SeikaLogiciel)
177+
[![Andrew Grant](https://avatars.githubusercontent.com/devlooped-user?s=39 "Andrew Grant")](https://github.com/wizardness)
178+
[![Lars](https://avatars.githubusercontent.com/u/1727124?v=4&s=39 "Lars")](https://github.com/latonz)
183179
184180
185181
<!-- sponsors.md -->
186-
187-
[![Sponsor this project](https://raw.githubusercontent.com/devlooped/sponsors/main/sponsor.png "Sponsor this project")](https://github.com/sponsors/devlooped)
188-
&nbsp;
182+
[![Sponsor this project](https://avatars.githubusercontent.com/devlooped-sponsor?s=118 "Sponsor this project")](https://github.com/sponsors/devlooped)
189183
190184
[Learn more about GitHub Sponsors](https://github.com/sponsors)
191185

src/Directory.Build.props

Lines changed: 14 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)' == ''">
@@ -43,6 +43,10 @@
4343

4444
<!-- Ensure MSBuild tooling can access package artifacts always via PKG_[PackageId] -->
4545
<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>
4650
</PropertyGroup>
4751

4852
<PropertyGroup Label="Build">
@@ -134,6 +138,15 @@
134138
<VersionSuffix Condition="!$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</VersionSuffix>
135139
<!-- Special case for tags, the label is actually the version. Backs compat since passed-in value overrides MSBuild-set one -->
136140
<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>
137150
</PropertyGroup>
138151

139152
<ItemGroup Label="ThisAssembly.Project">

0 commit comments

Comments
 (0)