From b8e3272c973e77603f1254b29b9c22060c9fcde1 Mon Sep 17 00:00:00 2001 From: SteveSamJacob19 Date: Fri, 5 Jul 2024 12:46:39 +0530 Subject: [PATCH 1/2] removed backticks --- scripts/build/clone_guides.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/build/clone_guides.rb b/scripts/build/clone_guides.rb index dca07bbd58..eccfa498f4 100755 --- a/scripts/build/clone_guides.rb +++ b/scripts/build/clone_guides.rb @@ -58,16 +58,18 @@ def directory_exists?(repo_name) # Clone static & interactive guides that are ready to be published to openliberty.io if repo_name.start_with?('iguide') || repo_name.start_with?('guide') # Clone the guides, using the dev branch for travis and prod for all other environments. - `git clone https://github.com/OpenLiberty/#{repo_name}.git -b #{guide_branch} src/main/content/guides/#{repo_name}` - + # `git clone https://github.com/OpenLiberty/#{repo_name}.git -b #{guide_branch} src/main/content/guides/#{repo_name}` + system("git","clone","https://github.com/OpenLiberty/#{repo_name}.git","-b","#{guide_branch}","src/main/content/guides/#{repo_name}") # # Clone the fallback branch if the guide_branch does not exist for this guide repo. if !(directory_exists?(repo_name)) - `git clone https://github.com/OpenLiberty/#{repo_name}.git -b #{fallback_guide_branch} src/main/content/guides/#{repo_name}` + # `git clone https://github.com/OpenLiberty/#{repo_name}.git -b #{fallback_guide_branch} src/main/content/guides/#{repo_name}` + system("git","clone","https://github.com/OpenLiberty/#{repo_name}.git","-b","#{fallback_guide_branch}","src/main/content/guides/#{repo_name}") end # Clone the default branch if the fallback_guide_branch does not exist for this guide repo. if !(directory_exists?(repo_name)) - `git clone https://github.com/OpenLiberty/#{repo_name}.git src/main/content/guides/#{repo_name}` + # `git clone https://github.com/OpenLiberty/#{repo_name}.git src/main/content/guides/#{repo_name}` + system("git","clone","https://github.com/OpenLiberty/#{repo_name}.git","src/main/content/guides/#{repo_name}") end end if ENV['DRAFT_SITE'] || ENV['GUIDES_DRAFT_SITE'] From 6bc8a5fdc5c7520a7b58829dbc36e100e0665515 Mon Sep 17 00:00:00 2001 From: SteveSamJacob19 Date: Fri, 5 Jul 2024 12:53:17 +0530 Subject: [PATCH 2/2] removed comments --- scripts/build/clone_guides.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/build/clone_guides.rb b/scripts/build/clone_guides.rb index eccfa498f4..1cf0b6c728 100755 --- a/scripts/build/clone_guides.rb +++ b/scripts/build/clone_guides.rb @@ -58,17 +58,13 @@ def directory_exists?(repo_name) # Clone static & interactive guides that are ready to be published to openliberty.io if repo_name.start_with?('iguide') || repo_name.start_with?('guide') # Clone the guides, using the dev branch for travis and prod for all other environments. - # `git clone https://github.com/OpenLiberty/#{repo_name}.git -b #{guide_branch} src/main/content/guides/#{repo_name}` system("git","clone","https://github.com/OpenLiberty/#{repo_name}.git","-b","#{guide_branch}","src/main/content/guides/#{repo_name}") # # Clone the fallback branch if the guide_branch does not exist for this guide repo. if !(directory_exists?(repo_name)) - # `git clone https://github.com/OpenLiberty/#{repo_name}.git -b #{fallback_guide_branch} src/main/content/guides/#{repo_name}` system("git","clone","https://github.com/OpenLiberty/#{repo_name}.git","-b","#{fallback_guide_branch}","src/main/content/guides/#{repo_name}") end - # Clone the default branch if the fallback_guide_branch does not exist for this guide repo. if !(directory_exists?(repo_name)) - # `git clone https://github.com/OpenLiberty/#{repo_name}.git src/main/content/guides/#{repo_name}` system("git","clone","https://github.com/OpenLiberty/#{repo_name}.git","src/main/content/guides/#{repo_name}") end end