[ci][build] fix commit id (#6420)
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
co-authored by
Cyrus Leung
parent
9dad5cc859
commit
ccd3c04571
@@ -30,8 +30,13 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
def embed_commit_hash():
|
||||
try:
|
||||
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"],
|
||||
encoding="utf-8").strip()
|
||||
if "BUILDKITE_COMMIT" in os.environ:
|
||||
# ci build
|
||||
commit_id = os.environ["BUILDKITE_COMMIT"]
|
||||
else:
|
||||
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"],
|
||||
encoding="utf-8").strip()
|
||||
|
||||
commit_contents = f'__commit__ = "{commit_id}"\n'
|
||||
|
||||
version_file = os.path.join(ROOT_DIR, "vllm", "commit_id.py")
|
||||
|
||||
Reference in New Issue
Block a user