Merge pull request #39 from RightBrain-Networks/bugfix/getVersionGroovyFunction
Added getVersion() groovy function
This commit is contained in:
		
							
								
								
									
										14
									
								
								vars/getVersion.groovy
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								vars/getVersion.groovy
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/env groovy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** 
 | 
				
			||||||
 | 
					 * Run semver_get_version to return the current version of the repository
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param flags Flags or arguments to pass to semver_get_version
 | 
				
			||||||
 | 
					 * @return "1.9.2"
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					def call(flags='') {
 | 
				
			||||||
 | 
					    def VERSION
 | 
				
			||||||
 | 
					    VERSION = sh(returnStdout: true, script: "semver_get_version ${flags}")
 | 
				
			||||||
 | 
					    return VERSION.trim()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Reference in New Issue
	
	Block a user