Merge pull request #89 from ctk-hq/fix/show-version

fix: always show version
pull/91/head
Artem Golub 3 years ago committed by GitHub
commit e7d59e0973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,11 +76,11 @@ def generate(services, volumes, networks, version="3", return_format='yaml'):
specified_version = get_version(version)
base_version = int(specified_version)
if services:
ret_yaml.dump({'version': DoubleQuotedScalarString(specified_version)}, s)
ret_yaml.explicit_start = False
s.write('\n')
ret_yaml.dump({'version': DoubleQuotedScalarString(specified_version)}, s)
ret_yaml.explicit_start = False
s.write('\n')
if services:
if base_version in {2, 3}:
ret_yaml.dump({'services': services}, s, transform=sequence_indent_four)

Loading…
Cancel
Save