Skip to content

Commit 24777da

Browse files
authored
Include Custom.Build.props versioning check for db-containers as well (#4401)
1 parent 80d17a1 commit 24777da

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
if (-not ($minMajorMinor -and $autoIncrement)) {
183183
throw "Missing MinVer settings in Custom.Build.props"
184184
}
185-
185+
186186
# Execute MinVer
187187
echo "MinVerVersion=$(minver --minimum-major-minor $minMajorMinor --auto-increment $autoIncrement)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
188188
- name: Validate build version
@@ -234,7 +234,19 @@ jobs:
234234
- name: Install MinVer CLI
235235
run: dotnet tool install --global minver-cli
236236
- name: Determine versions
237-
run: echo "MinVerVersion=$(minver)" >> $GITHUB_ENV
237+
shell: pwsh
238+
run: |
239+
# Read settings from Custom.Build.props
240+
[xml]$xml = Get-Content ./src/Custom.Build.props
241+
$minMajorMinor = $xml.selectNodes('/Project/PropertyGroup/MinVerMinimumMajorMinor').InnerText
242+
$autoIncrement = $xml.selectNodes('/Project/PropertyGroup/MinVerAutoIncrement').InnerText
243+
echo "MinVerMinimumMajorMinor=$minMajorMinor, MinVerAutoIncrement=$autoIncrement"
244+
if (-not ($minMajorMinor -and $autoIncrement)) {
245+
throw "Missing MinVer settings in Custom.Build.props"
246+
}
247+
248+
# Execute MinVer
249+
echo "MinVerVersion=$(minver --minimum-major-minor $minMajorMinor --auto-increment $autoIncrement)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
238250
- name: Validate build version
239251
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
240252
uses: ./.github/actions/validate-version

0 commit comments

Comments
 (0)