Coverage for appr/commands/generate.py: 0%

# Coverage for appr/commands/generate.py : 0%

## 19 statements 0 run 19 missing 0 excluded

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | from __future__ import absolute_import, division, print_function from appr.commands.deploy import DeployCmd class GenerateCmd(DeployCmd): name = 'generate' help_message = "Generate a package json" def _call(self): k = self.kub() if k.target == "docker-compose": self.output = 'yaml' self._generate() def _generate(self): k = self.kub() filename = "%s_%s.tar.gz" % (k.name.replace("/", "_"), k.version) with open(filename, 'wb') as f: f.write(k.build_tar(".")) def _render_dict(self): return self.kub().build() def _render_console(self): self._render_json()