Skip to content

Commit d54a6ed

Browse files
committed
Use commit_hash from local src for devel packages (#293)
1 parent 5f26ca6 commit d54a6ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

aliBuild

+5
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,11 @@ def doMain():
714714
# We are in development mode, we need to rebuild if the commit hash
715715
# is different and if there are extra changes on to.
716716
if spec["package"] in develPkgs:
717+
# Devel package: we get the commit hash from the checked source, not from remote.
718+
cmd = "cd %s && git rev-parse HEAD" % spec["source"]
719+
err, out = getstatusoutput(cmd)
720+
dieOnError(err, "Unable to detect current commit hash.")
721+
spec["commit_hash"] = out.strip()
717722
cmd = "cd %s && git diff -r HEAD && git status --porcelain" % spec["source"]
718723
h = Hasher()
719724
err = execute(cmd, h)

0 commit comments

Comments
 (0)