Skip to content

Commit 340338c

Browse files
authored
Merge pull request #804 from dev-hato/add_verinfo
add version info in status page
2 parents f42fcce + 0c3bb6d commit 340338c

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

plugins/hato.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from library.clientclass import BaseClient
2424
from library.jma_amesh import jma_amesh
2525
logger = getLogger(__name__)
26-
VERSION = "2.2.1"
2726

2827

2928
def split_command(command: str, maxsplit: int = 0) -> List[str]:
@@ -251,7 +250,7 @@ def version(client: BaseClient):
251250
user = client.get_send_user_name()
252251
logger.debug("%s called 'hato version'", user)
253252
str_ver = "バージョン情報\n```" \
254-
f"Version {VERSION}"
253+
f"Version {conf.VERSION}"
255254

256255
if conf.GIT_COMMIT_HASH:
257256
str_ver += f" (Commit {conf.GIT_COMMIT_HASH[:7]})"

run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def status():
136136
"""
137137
死活監視のためのレスポンスをJSON形式で返します
138138
"""
139-
return jsonify({'message': 'hato-bot is running'}), 200
139+
return jsonify({'message': 'hato-bot is running', 'version': conf.VERSION}), 200
140140

141141

142142
def main():

slackbot_settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
PLUGINS = ['plugins']
3636

3737
GIT_COMMIT_HASH = os.environ.get('GIT_COMMIT_HASH')
38+
39+
VERSION = "2.2.2"

0 commit comments

Comments
 (0)