Skip to content

Commit

Permalink
make the directory and clone the repository
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Jan 24, 2024
1 parent dd847e4 commit 7df0ea9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/bats/prepare-wp-upstreams.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ fi
echo "Getting configuration file..."
config="${GITHUB_WORKSPACE}/tests/fixtures/home/test-configuration.yml"
projects=("WordPress" "wordpress-network")

mkdir -p "${GITHUB_WORKSPACE}/work/"
working-copy-path="${GITHUB_WORKSPACE}/work/"
for project in "${projects[@]}"; do
echo "Preparing ${project}..."

# Change directory to the project path.
cd "${working-copy-path}" || { echo "Failed to change directory to ${working-copy-path}"; exit 1; }

# Clone the project.
repo_url=$(yq e ".projects.${project}.repo" "${config}")
echo "Cloning ${project} from ${repo_url}..."
git clone "${repo_url}" ./"${project}"
cd "${project}" || { echo "Failed to change directory to ${project}"; exit 1; }

# Parse the JSON file.
echo "Parsing JSON file..."
updates_json="updates.json"
Expand Down

0 comments on commit 7df0ea9

Please sign in to comment.