Software /
code /
prosody
Changeset
1311:fc113027a1d5
prosody: Read version from prosody.version file and set, er, prosody.version!
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 05 Jun 2009 01:27:18 +0100 |
parents | 1310:b5a7a9fc9161 |
children | 1312:ad7d144b6796 |
files | prosody |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/prosody Fri Jun 05 01:13:39 2009 +0100 +++ b/prosody Fri Jun 05 01:27:18 2009 +0100 @@ -87,6 +87,17 @@ prosody.events = require "util.events".new(); +-- Try to determine version +local version_file = io.open((CFG_SOURCEDIR or ".").."/prosody.version"); +if version_file then + prosody.version = version_file:read("*a"):gsub("%s*$", ""); + version_file:close(); +else + prosody.version = "unknown"; +end + +log("info", "Hello and welcome to Prosody version %s", prosody.version); + --- Load and initialise core modules require "util.import" require "core.xmlhandlers"