kopia lustrzana https://github.com/jupyterhub/repo2docker
Actually check out the ref that is passed to builder
We weren't actually doing this earlier. boopull/2/head
rodzic
f717ed4e04
commit
e81bfe8c89
|
@ -75,7 +75,7 @@ class Builder(Application):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
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'))
|
self.log.info(line, extra=dict(phase='fetching'))
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
self.log.error('Failed to check out ref %s', ref, extra=dict(phase='failed'))
|
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)
|
output_path = os.path.join(self.git_workdir, self.build_name)
|
||||||
self.fetch(
|
self.fetch(
|
||||||
self.source_url,
|
self.source_url,
|
||||||
'master',
|
self.source_ref,
|
||||||
output_path
|
output_path
|
||||||
)
|
)
|
||||||
for bp_class in self.buildpacks:
|
for bp_class in self.buildpacks:
|
||||||
|
|
Ładowanie…
Reference in New Issue