Skip to content

Conversation

@arihannu
Copy link

@arihannu arihannu commented Dec 13, 2023

Description

When running gitversion in Bitbucket Pipeline in Windows Powershell environment, gitversion.ps1 file is also written, in addition to the original gitversion.properties for Bash (not changed).

Related Issue

#3831

Motivation and Context

Getting the gitversion output variables into Powershell session requires now only one command:
. .\gitversion.ps1

Old way was to parse gitversion.properties file:

Get-Content .\gitversion.properties | % {$_ -replace "export ",""} | Out-File new.properties
$GitVerProps = ConvertFrom-StringData (Get-Content .\new.properties -raw)

How Has This Been Tested?

Included checks to existing tests.
I have tested this manually in our Bitbucket Pipelines and I haven't found any issues.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@arturcic arturcic enabled auto-merge December 14, 2023 16:20
@arturcic arturcic merged commit 15b88f8 into GitTools:main Dec 14, 2023
@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2023

Thank you @arihannu for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better Bitbucket support for gitversion /output buildserver for Powershell

2 participants