Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,22 @@ task cloneOrPullSqlRepo(type: Exec) {
description = 'Clone or pull the SQL repository for testing'
group = 'verification'

commandLine 'bash', '-c', '''
def skipPull = project.findProperty('skipSqlRepoPull') ?: 'false'

commandLine 'bash', '-c', """
if [ -d "remote/sql/.git" ]; then
echo "Pulling latest changes in remote/sql..."
cd remote/sql && git pull
if [ "${skipPull}" = "true" ]; then
echo "Skipping git pull for remote/sql (skipSqlRepoPull=true)"
else
echo "Pulling latest changes in remote/sql..."
cd remote/sql && git pull
fi
else
echo "Cloning SQL repository..."
mkdir -p remote
git clone https://github.com/opensearch-project/sql.git remote/sql
fi
'''
"""
}

task startTestCluster(type: Exec) {
Expand Down
Loading