diff --git a/app/root.py b/app/root.py index f2d72fe..5b5c3ad 100644 --- a/app/root.py +++ b/app/root.py @@ -2,9 +2,9 @@ import json from flask import Blueprint +from flask import jsonify bp = Blueprint('/', __name__, url_prefix='/') -from flask import jsonify @bp.route('/', methods=['GET']) diff --git a/generate-server-info.sh b/generate-server-info.sh index 4fcdb82..d641758 100755 --- a/generate-server-info.sh +++ b/generate-server-info.sh @@ -1,5 +1,5 @@ #!/bin/bash -BRANCH_NAME=$(git branch | awk '{ print $2 }') +BRANCH=$(git rev-parse --abbrev-ref HEAD) COMMIT_ID=$(git rev-parse HEAD) -echo "{ \"version\":\"${COMMIT_ID}\", \"branch\":\"${BRANCH_NAME}\", \"name\":\"flask-app-example\"}" > server_info.json +echo "{ \"version\":\"${COMMIT_ID}\", \"branch\":\"${BRANCH}\", \"name\":\"flask-app-example\"}" > server_info.json echo "Wrote server_info.json" \ No newline at end of file