Skip to content

Commit 9155228

Browse files
committed
always call git from invoke
1 parent 056e11c commit 9155228

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nbviewer/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ def parse_header_links(value):
201201
return links
202202

203203

204-
def git_info(path):
204+
def git_info(path, force_git=False):
205205
"""Return some git info"""
206-
if os.path.exists(GIT_INFO_JSON):
206+
if os.path.exists(GIT_INFO_JSON) and not force_git:
207207
with open(GIT_INFO_JSON, 'r') as f:
208208
return json.load(f)
209209
command = ['git', 'log', '-1', '--format=%H\n%s\n%cD']

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def git_info(ctx):
157157
sys.path.insert(0, os.path.join(APP_ROOT, "nbviewer"))
158158
from utils import git_info, GIT_INFO_JSON
159159
try:
160-
info = git_info(APP_ROOT)
160+
info = git_info(APP_ROOT, force_git=True)
161161
except Exception as e:
162162
print("Failed to get git info", e)
163163
return

0 commit comments

Comments
 (0)