Add script to list repo versions

This commit is contained in:
Nate McMaster 2017-11-14 16:20:16 -08:00
parent f58faa416b
commit 8f6f79bc47
2 changed files with 24 additions and 1 deletions

23
scripts/ListRepoVersions.ps1 Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env pwsh
<#
.SYNOPSIS
Tags each repo according to VersionPrefix in version.props of that repo
.PARAMETER Shipping
Only list repos that are shipping
#>
[cmdletbinding(SupportsShouldProcess = $true)]
param(
[switch]$Shipping = $false
)
Set-StrictMode -Version 2
$ErrorActionPreference = 'Stop'
Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1"
Assert-Git
$RepoRoot = Resolve-Path "$PSScriptRoot/../"
Get-Submodules $RepoRoot -Shipping:$Shipping | Format-Table -Property 'module','versionPrefix'

View File

@ -45,7 +45,7 @@ function Get-Submodules {
}
try {
$data = @{
$data = [PSCustomObject] @{
path = $_
module = $_.Name
commit = $(git rev-parse HEAD)