FarmMapsLib/Jenkinsfile.develop
Willem Dantuma b281f0bed8
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
Add resumable.js to fesm2015
2019-07-17 13:16:19 +02:00

40 lines
1019 B
Plaintext

pipeline {
agent any
environment {
PACKAGE_VERSION_PREFIX=sh(script: 'jq .version package.json |sed "s/\\"//g"', returnStdout: true).trim()
PACKAGE_VERSION="${PACKAGE_VERSION_PREFIX + '-prerelease.' + env.BUILD_NUMBER}"
}
stages {
stage('npm install'){
steps {
sh '''npm install'''
}
}
stage('build'){
steps {
sh '''ng build common
cp projects/common/src/assets/resumable.js dist/common/fesm2015
cp projects/common/src/assets/resumable.js dist/common/fesm5'''
}
}
stage('npm publish'){
steps {
sh '''cd dist/common
npm version ${PACKAGE_VERSION}
npm publish'''
}
}
}
post {
always {
emailext (
body: '${DEFAULT_CONTENT}',
mimeType: 'text/html',
replyTo: '${DEFAULT_REPLYTO}',
subject: '${DEFAULT_SUBJECT}',
to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])
)
}
}
}