Skip to content

Commit

Permalink
Add debugging information to git version script
Browse files Browse the repository at this point in the history
[release]

Work done for #196
  • Loading branch information
atruskie committed Apr 6, 2020
1 parent 4176273 commit 8f2315c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
nugetConfigPath: NuGet.config
displayName: Restore solution dependencies

- pwsh: src/git_version.ps1 -configuration ${{ configuration }} -self_contained '$(isSelfContained)' -runtime_identifier '$(runtimeArgument)' -set_ci | Tee-Object '$(Build.ArtifactStagingDirectory)/AP_version_vars.txt'
- pwsh: src/git_version.ps1 -configuration ${{ configuration }} -self_contained '$(isSelfContained)' -runtime_identifier '${{ platform.rid }}' -set_ci | Tee-Object '$(Build.ArtifactStagingDirectory)/AP_version_vars.txt'
displayName: run git_version.ps1 script
name: git_version

Expand Down
5 changes: 4 additions & 1 deletion src/git_version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ $self_contained = if ($self_contained -eq 'true') { 'true' } else { 'false' }

$commit_hash = git show -s --format="%H"

$branch = ((git log -n 1 --pretty=%d HEAD) | Select-String "-> ([\w-]+)").Matches[0].Groups[1].Value
$git_log = git log -n 1 --pretty=%d HEAD
Write-output "git log output: $git_log"
$branch = ($git_log | Select-String "-> ([\w-]+)").Matches[0].Groups[1].Value
Write-output "branch: $branch"

$describe = git describe --dirty --abbrev --long --always

Expand Down

0 comments on commit 8f2315c

Please sign in to comment.