From 28b87b5f903d9527a577d8834fadf45a9a01a74a Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Sat, 31 Jul 2021 09:54:16 -0700 Subject: [PATCH] Added config file parameter to init --- packer.py | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packer.py b/packer.py index b49d109..cc17dc2 100644 --- a/packer.py +++ b/packer.py @@ -38,15 +38,16 @@ def __init__(self, template, exc=None, only=None, vars=None, self.packer = sh.Command(exec_path) self.packer = self.packer.bake(**kwargs) - def init(self, upgrade=False): + def init(self, config_file, upgrade=False): """Executes a `packer init` + :param str config_file: Path to the configuration file :param bool upgrade: Updates plugins to the latest version """ self.packer_cmd = self.packer.init self._add_opt('-upgrade' if upgrade else None) - self._add_opt(self.template) + self._add_opt(config_file) return self.packer_cmd() diff --git a/setup.py b/setup.py index 15405b4..10e29ea 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def read(*parts): setup( name='python-packer', - version='1.0.2', + version='1.0.3', url='https://github.com/abhi1693/python-packer', author='abhi1693', author_email='desk.abhimanyu@gmail.com',