I am trying to fetch all git tags in descending order via groovy script. I am using below commands in my script.
def gettagsUrl = "git ls-remote --tags https://" + bitbucketUser + ":" + bitbucketPass +"bitbucket/scm/config/configurations-" + "Object" +".git" +"|" + command
def command = ['#!/bin/bash', '-c' , sort -Vr -k2 ]
But I am getting below error:-
groovy.lang.MissingPropertyException: No such property: sort for class: Script1 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
My git version is 1.8.3.1
Can anyone help here. TIA