Search This Blog

Showing posts with label powershell. Show all posts
Showing posts with label powershell. Show all posts

Sunday, 24 May 2020

How do I replace some text inside a text file with te buildId of a build/reease and save it back in the Azure DevOps ?

I would be a millionaire if I could ask a penny for each time that my colleagues ask me this question.
 
I would just run a PowerShell task with something like the below example:

<div class="code">
</div>
a=b+c

$oldValue = 'default-value'
$newValue = '$(Build.BuildId)'
$filePath='path-to-your-file/filename.txt'
(Get-Content $filePath) -replace $oldValue , $newValue | Set-Content $filePath




Problem with installing "Cloud Foundry" CLI on MacOS!

It's a while I'm working on a government project which will deploy into a government platform as a service that is called GovPaaS.  ...