Skip to content

Commit c233921

Browse files
authored
Use specific SHA for base/head comparison and dump shas out to console (#589)
1 parent bd9e15c commit c233921

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/auto-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ jobs:
2626
# Script checks the diff of src/Particular.PlatformSample/Particular.PlatformSample.csproj in the just-merged PR, and invokes a release of the next minor if ServiceControl/ServicePulse changes
2727
2828
# Get the diff of the component csproj file between the base and head of the just-merged PR
29-
$diff = $(git diff ${{ github.event.pull_request.base.sha }} HEAD src/Particular.PlatformSample/Particular.PlatformSample.csproj )
29+
$baseSha = "${{ github.event.pull_request.base.sha }}"
30+
$headSha = "${{ github.event.pull_request.head.sha }}"
31+
echo "Comparing diff of PR's base sha $baseSha with head sha $headSha to determine if ServiceControl/ServicePulse package was updated"
32+
$diff = $(git diff $baseSha $headSha src/Particular.PlatformSample/Particular.PlatformSample.csproj )
3033
3134
# Grep search for lines that show an addition contianing ServiceControl/ServicePulse
3235
$updates = $diff | grep -E '^\+\s+<PackageReference Include="Particular\.PlatformSample\.(ServiceControl|ServicePulse)"'

0 commit comments

Comments
 (0)