Last active
August 17, 2016 23:47
-
-
Save stanchan/374b897b36502240cbd02834a1f33faf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| script: | | |
| def gitURL = "{scm-url}" | |
| def getTags = ("git ls-remote -t -h $gitURL refs/tags/*").execute() | |
| def getBranches = ("git ls-remote -t -h $gitURL feature/*").execute() | |
| #return getBranches.text.readLines() | |
| # .collect {{ it.split()[1].replaceAll('refs/heads/', '') }} | |
| # .unique() | |
| # .findAll {{ it.startsWith('<pattern>') }} | |
| return getTags.text.readLines() | |
| .collect {{ it.split()[1].replaceAll('refs/tags/', '') }} | |
| .unique() | |
| .findAll {{ it ~= /\d*\./\d*\.\d*/ }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment