From fa17a3feb6ce07d3d0654c2a6a3b38e5969bdea1 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Wed, 5 Jun 2013 16:46:27 +0200 Subject: [PATCH] [ADD] Display PorteAil version on page result --- GNUmakefile | 4 +++- composants/index.html | 2 +- create_homepage.lua | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index c3bcf48..51d2b64 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -26,6 +26,8 @@ ## VARIABLES ## +VERSION=0.1.2-trunk + ## CONFIG PAR DEFAUT include paconfigrc @@ -104,7 +106,7 @@ test: # création de la page d'accueil homepage: @$(PROG_ECHO) -e "Création de la page d'accueil…" - @$(PROG_LUA) create_homepage.lua || exit 1 + @VERSION=$(VERSION) $(PROG_LUA) create_homepage.lua || exit 1 @$(PROG_ECHO) -e " …terminée." install: diff --git a/composants/index.html b/composants/index.html index 1fa0b72..f9eae8a 100644 --- a/composants/index.html +++ b/composants/index.html @@ -25,7 +25,7 @@ ${MENU} diff --git a/create_homepage.lua b/create_homepage.lua index 1591f32..a71a3c4 100755 --- a/create_homepage.lua +++ b/create_homepage.lua @@ -29,6 +29,7 @@ local default_css_filename = 'black.css' local default_css_menu_without = 'without_menu.css' local default_css_menu_with = 'with_menu.css' -- Other defaults values +local version = os.getenv('VERSION') or '(Unknown version)' local default_categ_extension = 'txt' local DIR_SEP = '/' local default_css_name = 'Default' @@ -275,6 +276,7 @@ substitutions = { CSS_COLOR=css_filename, CSS_NAME=css_name, DEFAULT_CSS=css_menu, + VERSION=version, } -- Get language configuration