Last active
May 29, 2017 12:00
-
-
Save WimObiwan/17d353b1f292e3f199e57ebc6f040c64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$match = 'CTArchitect-*' | |
git branch | %{ $_ -replace '^[* ] ([^ ]*$)', '$1' } | ?{ $_ -match '^(Version-.*)|(master)$' } | %{ git describe --match $match $_ } | |
$contains='' | |
git branch --contains $contains | %{ $_ -replace '^[* ] ([^ ]*$)', '$1' } | ?{ $_ -match '^(Version-.*)|(master)$' } | %{ git describe --match $match $_ } | |
git branch -r --contains $contains | %{ $_ -replace '^[* ] ([^ ]*)(?: -> .*)?$', '$1' } | ?{ $_ -match '^(?:.*/)?(Version-.*)|(master)$' } | %{ git describe --match $match $_ } | |
git tag --contains $contains | Group-Object { $_ -replace '^(.*-v?\d+\.\d+\.\d+)\.\d+$', '$1' } | Where-Object { $_.Name -like $match } | %{ $_.Group[$_.Group.Count - 1]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment