A single script was a reasonable solution to the problem of deploying any changes to developers and build servers, but maintenance was a horror. It best suited me to use Windows Explorer to index the functions, and to use Notepad++ for viewing them.
Category: Uncategorized
Prototyping with PowerShell
Requirements, specification, design and implementation Requirement We have two NuGet servers. The primary server is locally hosted for the developers. The second server is an Azure DevOps NuGet feed for contractors typically working outside the firewall. A scheduled task synchronizing the two servers runs hourly, copying any new packages from the local server to the … Continue reading Prototyping with PowerShell
A NuGet List item parser – Part 2: Including Pre-release packages
In Part 1 I reorganised my NuGet source synchronization tool's code to make it testable, with the specific aim of allowing pre-release packages to be synchronized. In particular, the affected code was isolated into this function: function Parse-PackageItem { param( [string]$Package ) $idVer = $Package.Split(' ') if ($idVer.Length -eq 2) { $id = $idVer[0] [string]$ver … Continue reading A NuGet List item parser – Part 2: Including Pre-release packages
A NuGet List item parser – Part 1: Making legacy code testable
I am building a tool to synchronize two NuGet servers. One is hosted on a development server, and the other is in the cloud. I need to add support for Pre-Release packages. In the first of two parts, I refactor the code to make it testable. The existing code This tool started its life as … Continue reading A NuGet List item parser – Part 1: Making legacy code testable
Parameterizing Scripts with PowerShell Data Files
In my previous blog I introduced the Get-Blacklist function which turned a string array into a hashtable for quick comparisons: function Get-Blacklist { param( [string[]]$Blacklist ) $blacklistHash = @{} $Blacklist | % { $blacklistHash[$_] = $true } $blacklistHash } and invoked it thus: . .\Scripts\Get-Blacklist.ps1 @blacklist = Get-Blacklist -Blacklist 'Powershell','Sandbox','sqlccJamie','Graphics','CentinelTest','Backoffice Service Portal' As a rule I … Continue reading Parameterizing Scripts with PowerShell Data Files
Building a script module
Like I said in the previous blog, I like to write short functions and keep each in its own file in source control. The problem is then to make these functions accessible. The usual approach is to dot-source them. I'm not particularly wild about the idea, but let's have a look at that first. Sample … Continue reading Building a script module
The Journey Begins
Thanks for joining me! Good company in a journey makes the way seem shorter. — Izaak Walton About this blog I have been a programmer for a very long time, and have learned a few things getting here. I want to share those things. For the last few years I have been working on a … Continue reading The Journey Begins