MCPcopy Create free account
hub / github.com/apache/solr / getGitRev

Function getGitRev

dev-tools/scripts/buildAndPushRelease.py:81–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 return content
80
81def getGitRev():
82 if not dev_mode:
83 status = os.popen('git status').read().strip()
84 if 'nothing to commit, working directory clean' not in status and 'nothing to commit, working tree clean' not in status:
85 raise RuntimeError('git clone is dirty:\n\n%s' % status)
86 if 'Your branch is ahead of' in status:
87 raise RuntimeError('Your local branch is ahead of the remote? git status says:\n%s' % status)
88 print(' git clone is clean')
89 else:
90 print(' Ignoring dirty git clone due to dev-mode')
91 return os.popen('git rev-parse HEAD').read().strip()
92
93
94def prepare(root, version, pause_before_sign, mf_username, gpg_key_id, gpg_password, gpg_home=None, sign_gradle=False):

Callers 1

prepareFunction · 0.85

Calls 2

stripMethod · 0.80
readMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…