90 -- Try to determine version |
90 -- Try to determine version |
91 local version_file = io.open((CFG_SOURCEDIR or ".").."/prosody.version"); |
91 local version_file = io.open((CFG_SOURCEDIR or ".").."/prosody.version"); |
92 if version_file then |
92 if version_file then |
93 prosody.version = version_file:read("*a"):gsub("%s*$", ""); |
93 prosody.version = version_file:read("*a"):gsub("%s*$", ""); |
94 version_file:close(); |
94 version_file:close(); |
|
95 if #prosody.version == 12 and prosody.version:match("^[a-f0-9]+$") then |
|
96 prosody.version = "hg:"..prosody.version; |
|
97 end |
95 else |
98 else |
96 prosody.version = "unknown"; |
99 prosody.version = "unknown"; |
97 end |
100 end |
98 |
101 |
99 log("info", "Hello and welcome to Prosody version %s", prosody.version); |
102 log("info", "Hello and welcome to Prosody version %s", prosody.version); |