Skip to content

Commit

Permalink
Fix terraform template name
Browse files Browse the repository at this point in the history
  • Loading branch information
GilbertCherrie committed Jul 11, 2024
1 parent 612ade6 commit 1365cfc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def sync
# https://github.ibm.com/manoj-puthran/sample-scripts/tree/v2.0/terraform/templates/hello-world
# is converted as
# "hello-world(v2.0):github.ibm.com/manoj-puthran/sample-scripts/terraform/templates"
# templates/hello-world
def self.template_name_from_git_repo_url(git_repo_url, branch_name, relative_path)
temp_url = git_repo_url
# URI library cannot handle git urls, so just convert it to a standard url.
Expand All @@ -64,7 +65,7 @@ def self.template_name_from_git_repo_url(git_repo_url, branch_name, relative_pat
basename = File.basename(relative_path)
parent_path = File.dirname(relative_path)
end
"#{basename}(#{branch_name}):#{hostname}#{path}/#{parent_path}"
"#{parent_path}/#{basename}"
end

private
Expand Down

0 comments on commit 1365cfc

Please sign in to comment.