Skip to content

Commit

Permalink
new approach of checking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Freezor committed Jun 16, 2024
1 parent 10b014e commit 2f700b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/prerelease-on-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ jobs:
Write-Host "No matching tags found, fetching the latest tag."
$latestTag = $tags | Select-Object -First 1
if ($latestTag) {
echo "from_tag=$latestTag" >> $GITHUB_ENV
echo "from_tag=$latestTag" >> $GITHUB_OUTPUT
echo "from_tag=$latestTag" >> $env:GITHUB_OUTPUT
Write-Host "Latest found tag is $latestTag"
} else {
Write-Host "No tags found at all."
Expand All @@ -62,17 +61,17 @@ jobs:
echo "Checking changes since tag: $from_tag"
if [ -z "$from_tag" ]; then
echo "No previous tag found."
echo "changes_detected=false" >> $GITHUB_ENV
echo "changes_detected=false" >> $env:GITHUB_ENV
exit 0
fi
commits=$(git log --oneline "$from_tag"..HEAD)
if [ -z "$commits" ]; then
echo "No changes detected since $from_tag."
echo "changes_detected=false" >> $GITHUB_ENV
echo "changes_detected=false" >> $env:GITHUB_ENV
else
echo "Changes detected since $from_tag:"
echo "$commits"
echo "changes_detected=true" >> $GITHUB_ENV
echo "changes_detected=true" >> $env:GITHUB_ENV
fi
- name: Output changes detected
Expand Down
2 changes: 1 addition & 1 deletion src/BuildVersionNumber.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function GetVersion {
}

# Construct the semantic version.
$semanticVersion = "v$versionCore.$buildNumber-$aasmodel-$suffix-$buildSuffix"
$semanticVersion = "$versionCore.$buildNumber-$aasmodel-$suffix-$buildSuffix"

return $semanticVersion
}
Expand Down

0 comments on commit 2f700b0

Please sign in to comment.