jenkins-scripts/install/no-electron/Jenkinsfile

18 lines
600 B
Plaintext
Raw Permalink Normal View History

2020-09-26 14:28:11 +03:00
import groovy.json.JsonBuilder
import groovy.json.JsonSlurper
import groovy.json.JsonOutput
import java.util.HashMap
import groovy.json.*
stage('install:no:electron') {
echo 'Пробуем убрать electron из зависимостей)'
def elString = sh(returnStdout: true, script: "cat ./package.json | grep electron\\\" || echo 'empty'")
echo elString
if (elString.contains(',')) {
sh "mv ./package.json ./tmp-package.json"
echo "Electron найден. Удаляем..."
sh "cat ./tmp-package.json | grep -v electron\\\" > ./package.json"
}
}