Netflix / dispatch-docker

Apache License 2.0
206 stars 87 forks source link

Version Extract Regex fixed for both docker-compose 1+ and 2+ #138

Closed Keetmalin closed 2 years ago

Keetmalin commented 2 years ago

Issue:

With the previous implementation, I get the following error. Technically, this file should also support 2+ versions of docker-compose. FAIL: Expected minimum docker-compose version to be 1.19.0 but found Docker Compose version v2.2.3

This is because, the command docker-compose --version in 1+ and 2+ returns two different formats.

Solution

Proposing a way to extract the version with grep. This works for version numbers with 2 digits. Please comment back, if you think the version numbers can also be 3 digits.

mvilanova commented 2 years ago

Thanks for the fix @Keetmalin!