Skip to content

Commit 77c0272

Browse files
committed
Fix regression: Allow #tip and #latest tags in *.lib
PR#873 introduced a regression in *.lib file handling: https://github.com/ARMmbed/mbed-cli/pull/873/files Before 1.10.0, Mbed CLi was able to import components from lib files with 'latest' or 'tip' tag as revision specifier: https://github.com/ARMmbed/mbed-os/#latest It is no longer possible with 1.10.0: [mbed] ERROR: Named branches not allowed in .lib, offending lib is mbed-os.lib This change brings back support for both tags in lib files.
1 parent ff6b14a commit 77c0272

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mbed/mbed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ def fromlib(cls, lib=None):
10611061

10621062
if m_repo_ref:
10631063
rev = m_repo_ref.group(3)
1064-
if rev and not re.match(r'^([a-fA-F0-9]{6,40})$', rev):
1064+
if rev and rev != 'latest' and rev != 'tip' and not re.match(r'^([a-fA-F0-9]{6,40})$', rev):
10651065
error('Named branches not allowed in .lib, offending lib is {} '.format(os.path.basename(lib)))
10661066

10671067
if not (m_local or m_bld_ref or m_repo_ref):

0 commit comments

Comments
 (0)