From e81bfe8c8997fe4024d1f4fcab4c41891a5dd999 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Sun, 21 May 2017 20:32:02 -0700 Subject: [PATCH] Actually check out the ref that is passed to builder We weren't actually doing this earlier. boo --- builder/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/app.py b/builder/app.py index 2a28bbdf..34c58026 100644 --- a/builder/app.py +++ b/builder/app.py @@ -75,7 +75,7 @@ class Builder(Application): sys.exit(1) try: - for line in execute_cmd(['git', '--git-dir', os.path.join(output_path, '.git'), 'checkout', ref]): + for line in execute_cmd(['git', '--git-dir', os.path.join(output_path, '.git'), 'reset', '--hard', ref]): self.log.info(line, extra=dict(phase='fetching')) except subprocess.CalledProcessError: self.log.error('Failed to check out ref %s', ref, extra=dict(phase='failed')) @@ -113,7 +113,7 @@ class Builder(Application): output_path = os.path.join(self.git_workdir, self.build_name) self.fetch( self.source_url, - 'master', + self.source_ref, output_path ) for bp_class in self.buildpacks: