This post is all about small but very useful piece of powershell code.
We’re using VSTS at work, and our continuous delivery workflow contains step to put all builds to network share (NAS in local network). Each build has auto incrementing version of library ( msdn). But VSTS doesn’t have any step under building or releasing cycle to put this version into VSTS at any form. Actually, you can write down script, which connects to VSTS by API and then put build version into WI field. But what is easy, when you need to compare commit and build version, just go through all builds at share and print build version and VSTS build number. Script to do that here:

What I usually do: go to network share from powershell, and then just run this script with recurse param. Output is similar to these lines:


c:\> cd "\\buildsrv\app builds"
\\buildsrv\app builds\master> Get-AssemblyInfo -Recurse
\\buildsrv\app builds\master\20160523.2\app.exe 2.34.5987.21819
\\buildsrv\app builds\master\20160523.3\app.exe 2.34.5987.22716
\\buildsrv\app builds\master\20160530.1\app.exe 2.34.5994.25569
\\buildsrv\app builds\master\20160601.1\app.exe 2.34.5996.17682
\\buildsrv\app builds\master\20160605.1\app.exe 2.35.6000.33670
\\buildsrv\app builds\master\20160607.1\app.exe 2.35.6002.22362
\\buildsrv\app builds\master\20160609.2\app.exe 2.35.6004.32871
\\buildsrv\app builds\master\20160705.1\app.exe 2.37.6030.33831
\\buildsrv\app builds\master\20160808.11\app.exe 2.39.6064.31912
\\buildsrv\app builds\master\20160828.1\app.exe 2.39.6084.16549
\\buildsrv\app builds\master\20160915.1\app.exe 2.39.6102.27957

Related Posts

developing

Vim as python IDE

This post was expected to be personal and just to tell the world my pain. I tired and wanna sleep. Step by step would be there. Meanwhile, I have done a lot of steps without Read more…

devops

How to add Let’s Encrypt to your OpenShift WordPress deployment.

I haven’t been on vacation for one year. Year before we spent two weeks in a trip over the ocean and that’s all that I have for two years. Since my last vacation, I’ve tired Read more…

powershell

Get-Shares.ps1

So, let’s continue blogging about my PowerShell tools. I’m browsing throughout my corporate network using PowerShell mostly. The biggest problem with this approach is that when you go to the network share (by UNC path) Read more…