Skip to content

Commit

Permalink
Fix getting of branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
jecklgamis committed Dec 20, 2023
1 parent 9ae11fa commit d8e4310
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
4 changes: 2 additions & 2 deletions generate-server-info.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit d8e4310

Please sign in to comment.