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:25:54 UTC
[comdev-events-site] branch preview/sample updated: Must define HUGO_DIR
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 097f988 Must define HUGO_DIR
097f988 is described below
commit 097f988aca94dc5f924c989b7bb13d0c482018af
Author: Sebb <se...@apache.org>
AuthorDate: Thu Apr 27 23:25:46 2023 +0100
Must define HUGO_DIR
---
Jenkinsfile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 49479fa..d02e8e2 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -36,8 +36,10 @@ 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()
+ env.HUGO_DIR = sh(script:'which hugo', 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()
+ // Use the location found above to ensure same hugo can be used later
+ env.HUGO_VERSION_CURRENT = sh(script:'${env.HUGO_DIR}/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}'"
}