You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2023/04/27 22:17:26 UTC
[comdev-events-site] branch preview/sample updated: Strip leaving v
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch preview/sample
in repository https://gitbox.apache.org/repos/asf/comdev-events-site.git
The following commit(s) were added to refs/heads/preview/sample by this push:
new a695169 Strip leaving v
a695169 is described below
commit a6951697ae220111e3efc584e1df979fcf15b527
Author: Sebb <se...@apache.org>
AuthorDate: Thu Apr 27 23:17:18 2023 +0100
Strip leaving v
---
Jenkinsfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index ee077bf..49479fa 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -36,8 +36,8 @@ pipeline {
script {
// Capture last commit hash for final commit message
env.LAST_SHA = sh(script:'git log -n 1 --pretty=format:\'%H\'', returnStdout: true).trim()
- // Get current Hugo version
- env.HUGO_VERSION_CURRENT = sh(script:'hugo version | cut -f 2 -d" "|cut -d- -f 1', returnStdout: true).trim()
+ // Get current Hugo version (looks like hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended linux/amd64 ...)
+ env.HUGO_VERSION_CURRENT = sh(script:'hugo version | cut -f 2 -d" "|cut -d- -f 1|sed -e "s!^v!!"', returnStdout: true).trim()
sh "echo Hugo current: '${env.HUGO_VERSION_CURRENT}'"
sh "echo Hugo target: '${HUGO_VERSION}'"
}