| |
@@ -108,9 +108,10 @@
|
| |
|
| |
def ver_len(s):
|
| |
return s.count(".")
|
| |
- # Find all symlinks in the directory.
|
| |
+ # Find all latest symlinks in the directory.
|
| |
all_symlinks = filter(
|
| |
- lambda x: os.path.islink(os.path.join(compose_path, x)), os.listdir(compose_path)
|
| |
+ lambda x: os.path.islink(os.path.join(compose_path, x)),
|
| |
+ (x for x in os.listdir(compose_path) if latest_symlink_re.match(x)),
|
| |
)
|
| |
# Filter the ones with most version components.
|
| |
links = sorted(all_symlinks, key=ver_len, reverse=True)
|
| |