Skip to content

Commit

Permalink
Modify regular expression for SDK tag version in github.
Browse files Browse the repository at this point in the history
In AspeedTech-BMC/openbmc the tag name is head/v07.00
which causes os-release returns unmatch and use
the commit hash as SDK version.

Signed-off-by: Steven Lee <[email protected]>
Change-Id: I870ea01e62b16c02d54d2e34113c10fd0bc2fd24
  • Loading branch information
stevenlee7189 authored and jamin-aspeed committed May 14, 2021
1 parent 7435fed commit 89146d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions meta-aspeed-sdk/recipes-core/os-release/os-release.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ python do_compile_prepend() {
res=bb.process.run(("git -C %s symbolic-ref -q --short HEAD ||" +
"git -C %s describe --tags --exact-match")
% (work_dir, work_dir))[0].strip("\n")
if re.match("^v\d+\.\d+$", res):
sdk_ver=res

tag_ver = re.search("(v\d+\.\d+)", res)
if tag_ver:
sdk_ver=tag_ver.group(1)
else:
sdk_ver=bb.process.run("git -C %s rev-parse HEAD"
% work_dir)[0].strip("\n")
Expand Down

0 comments on commit 89146d1

Please sign in to comment.