You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2021/07/21 09:12:38 UTC

[camel-website] branch main updated: chore: build content scheduled for future in PRs

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new e26bcc8  chore: build content scheduled for future in PRs
e26bcc8 is described below

commit e26bcc8dd3994fcc6de08a2311b95d0eff01cbd8
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Wed Jul 21 11:12:26 2021 +0200

    chore: build content scheduled for future in PRs
    
    In pull requests checks can't be run unless the HTML files that are
    checked are generated. So for files with dates in the future no HTML
    files are generated and thus checks might pass as nothing was checked.
    
    This adds `HUGO_OPTIONS` environment variable to `build:hugo` script,
    that allows passing `--buildFuture` for pull request builds. This
    doesn't have any effect on the production builds as those are done on
    ASF Jenkins.
---
 .github/workflows/pr.yaml | 1 +
 package.json              | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml
index 383fe13..e3f57d7 100644
--- a/.github/workflows/pr.yaml
+++ b/.github/workflows/pr.yaml
@@ -21,6 +21,7 @@ on: pull_request
 
 env:
   CAMEL_ENV: production
+  HUGO_OPTIONS: '--buildFuture'
 
 jobs:
   checks:
diff --git a/package.json b/package.json
index a67df5e..54751ec 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
   "license": "Apache-2.0",
   "scripts": {
     "build:antora": "antora --clean --fetch antora-playbook.yml --stacktrace --require ./patch-sitemap.js",
-    "build:hugo": "hugo --cacheDir ${HUGO_CACHE_DIR:-$(pwd)/.hugo_data}",
+    "build:hugo": "hugo --cacheDir ${HUGO_CACHE_DIR:-$(pwd)/.hugo_data} ${HUGO_OPTIONS:-}",
     "build:minify": "gulp minify",
     "build:sitemap": "gulp sitemap",
     "build": "run-s build:antora build:hugo build:sitemap build:minify",