Skip to content

Commit a1b6259

Browse files
committed
admin-guide: add back the dynamic version info support
Signed-off-by: Hofi <hofione@gmail.com>
1 parent bc8d6d5 commit a1b6259

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

.github/workflows/jekyll-gh-pages.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ jobs:
6868
./_tools/pack debug
6969
ls -AlR assets/js
7070
71+
# Update the site.config.version info in the _config.yml based on the current syslog-ng version
72+
#
73+
./_tools/update_config_version
74+
7175
- name: Build with Jekyll
7276
# Outputs to the './_site' directory by default
7377
run: |
@@ -97,6 +101,8 @@ jobs:
97101
ls -AlR _site/assets/js
98102
99103
# Generate and add Doxygen source documentation
104+
#
105+
echo "Generating Doxygen source documentation"
100106
sudo apt-get install doxygen graphviz -y
101107
102108
OSE_SRC_REPO=https://github.com/syslog-ng/syslog-ng.git
@@ -111,6 +117,8 @@ jobs:
111117
rm -Rf ./_work
112118
113119
# Generate final manpages from the pre-generated special markdown files
120+
#
121+
echo "Generating manpages"
114122
INPUT_DIRECTORY=./_data/manpages
115123
OUTPUT_DIRECTORY=./_site/manpages
116124
./_tools/mangen "${INPUT_DIRECTORY}" "${OUTPUT_DIRECTORY}"

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ footer:
258258
product:
259259
name: 'syslog-ng Open Source Edition'
260260
short_name: 'syslog-ng OSE'
261+
# NOTE: This is updated automatically in the GitHub workflow (jekyll-gh-pages.yml) from the current syslog-ng version
261262
version: '4.9.0'
262263

263264
repository: syslog-ng/syslog-ng.github.io

_tools/update_config_version

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
echo "Updating version info"
2+
3+
VERSION=$(curl -s https://raw.githubusercontent.com/syslog-ng/syslog-ng/develop/VERSION.txt)
4+
sed -E "s/(version: ')[0-9]+\.[0-9]+\.[0-9]+(')/\1$VERSION\2/" _config.yml > _config.yml.new
5+
6+
mv -f _config.yml.new _config.yml
7+
8+
echo "Version set to $VERSION"
9+
grep 'version:' _config.yml

doc/_admin-guide/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: syslog-ng Open Source Edition Administration Guides
33
id: adm-guide
44
description: >-
5-
Welcome to the {{ site.product.name }} 4.8.1 Administration Guide. This document describes how to configure and manage {{ site.product.name }} ({{ site.product.short_name }}). Background information for the technology and concepts used by the product is also discussed.
5+
Welcome to the {{ site.product.name }} {{ site.product.version }} Administration Guide. This document describes how to configure and manage {{ site.product.name }} ({{ site.product.short_name }}). Background information for the technology and concepts used by the product is also discussed.
66
---
77

88
## Target audience

0 commit comments

Comments
 (0)