[ 
https://issues.apache.org/jira/browse/CAMEL-14709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17065575#comment-17065575
 ] 

Aemie commented on CAMEL-14709:
-------------------------------

We can work on this together to understand what and where the changes are to be 
made. It's hard to get everything based on windows as the files are based on 
how Linux variables are used. Also Pooja, this issue just doesn't get resolved 
with replacing pwd by %cd% 'cause I tried and it didn't work out. 

> Make sure that the website can be built in Windows
> --------------------------------------------------
>
>                 Key: CAMEL-14709
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14709
>             Project: Camel
>          Issue Type: Task
>          Components: website
>            Reporter: Zoran Regvart
>            Priority: Major
>              Labels: help-wanted
>
> Right now we [run the hugo 
> build|https://github.com/apache/camel-website/blob/21dbd4d74b5f0270a697e8de300eeff30dca14dd/package.json#L6]
>  from a npm/yarn script.
> This includes the {{--cacheDir}} parameter which specifies where Hugo puts 
> cached data, e.g. data fetched via {{getJSON}}.
> When we build the website on the build server we wish to take advantage of 
> previously cached data, and to do that we [set the {{HUGO_CACHE_DIR}} 
> environment 
> variable|https://github.com/apache/camel-website/blob/21dbd4d74b5f0270a697e8de300eeff30dca14dd/Jenkinsfile#L41].
> The shell interpolation used: {{${HUGO_CACHE_DIR:-$(pwd)/.hugo_data}}} makes 
> sure that if {{HUGO_CACHE_DIR}} is not defined {{.hugo_data}} in current 
> directory is used instead.
> This doesn't work on Windows as it relies on Unix shell variable 
> interpolation.
> We need a solution that has the same functionality, i.e. we can specify the 
> cache directory via {{HUGO_CACHE_DIR}} environment variable and if the 
> {{HUGO_CACHE_DIR}} variable is not set use {{.hugo_data}} in current 
> directory, but works on both Unix and Windows systems.
> I think there could be a way to use some cross platform npm packages to do 
> this intended to be used in scripts; or we could create a helper JavaScript 
> file for this and invoke hugo binary from it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to