Projet

Général

Profil

Bug #9923 » silverpeas-crash.groovy

Script de récupération et de déploiement de Silverpeas CRaSH - Miguel Moquillon, 31/07/2018 16:54

 
import java.nio.file.Path
import java.io.File

log.info 'Fetch and Install Silverpeas CRaSH'

// update the version with the Silverpeas CRaSH one you want to install
def version = '6.1-build180731'

// fetch and install Silverpeas CRaSH
String repo = 'releases'
if (version.contains('-build')) {
repo = 'builds'
}
def url = "https://www.silverpeas.org/nexus/content/repositories/${repo}/org/silverpeas/crash/silverpeas-crash/${version}/silverpeas-crash-${version}.war"
Path deploymentsPath = "${settings.SILVERPEAS_HOME}/deployments/silverpeas-crash.war".asPath()
def war = deploymentsPath.toFile().newOutputStream()
war << new URL(url).openStream()
war.close()
    (1-1/1)