18 lines
		
	
	
		
			513 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			513 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
| stage ('production build') {
 | |
|     script {
 | |
|         def tag = sh(returnStdout: true, script: "git tag --contains").trim()
 | |
|         def branchName = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
 | |
| 
 | |
|         if (tag) {
 | |
|             echo 'found tag ' + tag
 | |
|             def tagNoV = tag.substring(1)
 | |
|             sh "VERSION=${tagNoV} npm run build:prod";
 | |
|         } else {
 | |
|             echo 'tag not found'
 | |
|             sh "VERSION=master npm run build:prod"
 | |
|         }
 | |
| 
 | |
|         sh 'ls dist';
 | |
|     }
 | |
| }
 |