Skip to content

Commit

Permalink
always setup environment for build in blueprint based projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmark committed May 15, 2019
1 parent f1ebf19 commit f156cdb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/models/concerns/autotune/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,15 @@ def sync_from_blueprint(update: false)
# Create a new repo object based on the projects working dir
project_dir = setup_shell

# check if the directory already exists on disk, make sure it's updated,
# or copy the code from the blueprint
if project_dir.exist?
if update || project_dir.version != blueprint_version
# Update the project files. Because of issue #218, due to
# some weirdness in git 1.7, we can't just update the repo.
# We have to make a new copy.
project_dir.rm
blueprint_dir.copy_to(project_dir.working_dir)
elsif project_dir.version == blueprint_version
# if we're not updating, bail if we have the files
return
end
else
# Copy the blueprint to the project working dir.
Expand All @@ -122,12 +121,13 @@ def sync_from_blueprint(update: false)
# Checkout correct version and branch
project_dir.commit_hash_for_checkout = blueprint_version
project_dir.update
# Make sure the environment is correct for this version
project_dir.setup_environment
# update the config
self.blueprint_config = project_dir.read(BLUEPRINT_CONFIG_FILENAME)
end

# Make sure the environment is correct for this version
project_dir.setup_environment

true
end
end
Expand Down

0 comments on commit f156cdb

Please sign in to comment.