Add script to list repo versions
This commit is contained in:
parent
f58faa416b
commit
8f6f79bc47
|
|
@ -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'
|
||||||
|
|
@ -45,7 +45,7 @@ function Get-Submodules {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$data = @{
|
$data = [PSCustomObject] @{
|
||||||
path = $_
|
path = $_
|
||||||
module = $_.Name
|
module = $_.Name
|
||||||
commit = $(git rev-parse HEAD)
|
commit = $(git rev-parse HEAD)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue