Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14709

Make sure that the website can be built in Windows

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Abandoned
    • None
    • None
    • website
    • Moderate

    Description

      Right now we run the hugo build 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.
      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zregvart Zoran Regvart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: