Skip to content

Commit

Permalink
build: source version number from the changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Sep 17, 2024
1 parent 79b5e5e commit df3794c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/part-compute-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ jobs:
$revRequestUrl = "$apiBaseUrl/workflows/$workflowId/runs?created=$($createdAtPST.ToString($dateFormat))..$($createdAtPST.AddDays(1).ToString($dateFormat))";
$rev = curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" $revRequestUrl | jq .total_count;
$path = "version.txt";
$version = "$((cat $path).Trim())"
# Current version number is sourced from the top of CHANGELOG.md
$version = Get-Content -Path CHANGELOG.md -TotalCount 1
$version = $version.Trim('#').Trim()
$date = $createdAtPST.ToString("yyyyMMdd")
$prereleaseSlug = "${{ inputs.prereleaseSlug }}"
echo "Version from $($path): $version";
Expand Down
2 changes: 1 addition & 1 deletion Coalesce.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Coalesce.lutconfig = Coalesce.lutconfig
src\Common.props = src\Common.props
src\Directory.Build.props = src\Directory.Build.props
version.txt = version.txt
CHANGELOG.md = CHANGELOG.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCBE3CC2-7DA3-4BA1-96A1-7BAAF8533D58}"
Expand Down
1 change: 0 additions & 1 deletion version.txt

This file was deleted.

0 comments on commit df3794c

Please sign in to comment.