It is easy to get your local branches in Git out of sync with the upstream repository, leaving old dead branches locally that you can’t remember creating. You can use the prune option on your Git Fetch command to remove the remote branch references, but that command does nothing to remove local branches.
A good while ago, I wrote a small PowerShell script to wrapper the running of the Git Fetch and then based on the deletions remove any matching local branches. Then finally returning me to my trunk branch.
Note: This script was based on some sample I found, but I can’t remember where to give credit, sorry.
I used to just run this command from the command line, but I recently thought it would be easier if it became a Git Alias. As Git Aliases run a bash shell, this meant I needed to shell out to PowerShell 7. Hence, my Git Config ended up being as shown below
name = Richard Fennell
email = firstname.lastname@example.org
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
defaultBranch = main
tidy = !pwsh.exe C:/Users/fez/OneDrive/Tools/Remove-DeletedGitBranches.ps1 -force
I can just run 'git tidy‘ and all my branches get sorted out.
A question I am often asked when consulting on Azure DevOps is ‘how can I automatically create release notes and how can I publish them?’.
Well it is for just this requirement that I have written a set of Azure DevOps Pipeline Tasks
Release Note Generator – to generate release notes. I strongly recommend this Cross-platform Node-based version. I plan to deprecate my older PowerShell version in the not too distant future as it uses ‘homegrown logic’, as opposed to standard Azure DevOps API calls, to get associated items.
Once the document has been generated there is a need for a decision as to how to publish it. TThere are a few options
Attach the markdown file as an artefact to the Build or Pipeline. Note you can’t do this with a UI based Releases as they have no concept of artefacts, but this is becoming less of a concern as people move to multistage YAML.
Save in some other location e.g Azure Storage or if on-premises a UNC file share
Convert the markdown release note document, or the whole WIKI, to a PDF and use any of the above options using first my WIKI PDF Exporter Task then another task.
I personally favour the 1st and 4th options used together. Attachment to the pipeline and then upload the document to a WIKI
A sample of suitable YAML is shown below, uploading the document to an Azure DevOps WIKI. Please note that the repo URL and authentication can trip you up here so have a good read of the provided documentation before you use this task.
- task: richardfennellBM.BM-VSTS-WIKIUpdater-Tasks.WikiUpdaterTask.WikiUpdaterTask@1
displayName: 'Git based WIKI Updater'
message: 'Update from Build'
But when do I generate the release notes?
I would suggest you always generate release notes every build/pipeline i.e. a document of the changes since the last successful build/pipeline of that build definition. This should be attached as an artefact.
However, this per build document will usually too granular for use as ‘true’ release notes i.e. something to hand to a QA team, auditor or client.
To address this second use case I suggest, within a multistage YAML pipeline (or a UI based release), having a stage specifically for generating release notes.
My task has a feature that it will check for the last successful release of a pipeline/release to the stage it is defined in, so will base the release note on the last successful release to that given stage. If this ‘documentation’ stage is only run when you are doing a ‘formal’ release, the release note generated will be since the last formal release. Exactly what a QA team or auditor or client might want.
So I hope that this post provides some ideas as to how you can use my tasks generate some useful release notes.
I have just completed the upgrade of our Blog Server to BlogEngine 3.3. This upgrade is a bit more complex than the usual upgrade as between 3.2 to 3.3 there is a change to Razor views for all the widgets. This means you need to remove all the old widgets you have and re-add them using the new razor equivalents.
As our blog is backed by SQL, this mean a SQL script to clear down the old widgets, then a manual add of the new versions on each blog we have on our server. One point to note, if using SQL you do need to get BlogEngine 3.3 from its GitHub repo (at the time of writing, I am sure this will change) as after the formal 3.3 release on CodePlex there is a fix for an issue that stopped the editing of widget properties.
So first experiences with 3.3?
Seems much more responsive, so all is looking good
Brian Harry has done a couple of very interesting posts (post 1 and post 2) on the recent outages of the VSTS service. Whether you use VSTS or not they make interesting reading for anyone who is involved in running SaaS based systems, or anything at scale.
From the posts the obvious reading is you cannot under estimate the importance of
in production montoring
having an response plan
doing a proper root cause analysis
and putting steps in place to stop the problem happening again
My primary blog editor has been Microsoft Live Writer for years, but it has always been a pain to install via Windows Essentials (as I don’t want the rest of the product), also I was never able to find the right version when I rebuilt a PC. This was not helped by the fact there has been no development of the product for years, so I struggled to remember what year version I really needed (last one was 2012 by the way).
So it is great news that the code base has gone Open Source at http://openlivewriter.org/, and this is my first post using the new editor. Seem to work great.
Visual Studio Dev Essentials is mostly a re-packing of all the tools that were already freely available from Microsoft e.g. Visual Studio Community Edition, Tem Foundation Server Express etc.; but there are some notable additions* (some coming soon)
Pluralsight (6-month subscription)—limited time only
Xamarin University mobile training— coming soon
WintellectNOW (3-month subscription)
Microsoft Virtual Academy
HackHands Live Programming Help ($25 credit)
Priority Forum Support
Azure credit ($25/month for 12 months)—coming soon
Visual Studio Team Services account with five users