From 7d65ab0a09411a21156bb521c85c77e785670463 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Sun, 3 Aug 2008 18:10:51 +0000 Subject: [PATCH] ADD FIX#3 --- doc/graphiques/maquette_1.svg | 4 ++-- nbproject/private/private.xml | 2 +- pages/about.html | 2 +- tools/tools.rb | 36 ++++++++++++++++++++++++++++++++--- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/doc/graphiques/maquette_1.svg b/doc/graphiques/maquette_1.svg index 6bc4f07..f1491a1 100644 --- a/doc/graphiques/maquette_1.svg +++ b/doc/graphiques/maquette_1.svg @@ -651,8 +651,8 @@ id="path2542" sodipodi:nodetypes="cc" /> modules/erl/euphorik_protocole.erl - 713 + 722 js/pageMinichat.js diff --git a/pages/about.html b/pages/about.html index fff8eee..e42dace 100644 --- a/pages/about.html +++ b/pages/about.html @@ -1,7 +1,7 @@

euphorik.ch

-

Version : 1.1a

+

Version : 1.1.0a

Auteur : Pifou

FAQ

diff --git a/tools/tools.rb b/tools/tools.rb index 2a5a1fe..ec0950e 100644 --- a/tools/tools.rb +++ b/tools/tools.rb @@ -1,5 +1,5 @@ #!/usr/bin/ruby -# coding: utf8 +# coding: utf-8 =begin Copyright 2008 Grégory Burri @@ -52,6 +52,33 @@ class VerifJS } return true end +end + +# Classe de gestion de la version +class Version + # @param dossier la racine du site (par exemple "/var/www/euphorik" + def initialize(dossier) + @dossier = dossier + File.open(@dossier + '/VERSION') {|file| + @version = file.readline() + } + # les fichiers HTML dans lesquels mettre à jour la version + @fichiers = ['/pages/about.html'] + @balise = /().*?(<\/span>)/ + end + + # met à jour la version dans les fichiers @fichiers + def maj + @fichiers.each{|fichier| + fichier = @dossier + fichier + lines = IO.readlines(fichier) + File.open(fichier, 'w') {|io| + lines.each{|l| + io.write(l.sub(@balise){|m| $1 + @version + $2}) + } + } + } + end end @@ -130,5 +157,8 @@ class MiseEnProd end -v = VerifJS.new("../js") -v.verifier() \ No newline at end of file +#verifJS = VerifJS.new("../js") +#verifJS.verifier() + +#version = Version.new("..") +#version.maj() -- 2.43.0