File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 2828 node-version : ' 20'
2929
3030 - name : Run Prep from Master
31- run : yarn copy-clickhouse-repo-docs
31+ run : yarn copy-clickhouse-repo-docs -f
3232
3333 - name : Run Auto Generate Settings
3434 run : yarn autogenerate-settings
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33function parse_args() {
4+ force_pull=false
45
5- while getopts " hl:" opt; do
6+ while getopts " hl:f " opt; do
67 case " $opt " in
78 h)
89 # Display the usage information and exit when -h is provided
9- echo " Usage: $0 [-l path_to_local_clickhouse_repo]"
10+ echo " Usage: $0 [-l path_to_local_clickhouse_repo] [-f] "
1011 echo " "
1112 echo " Options:"
1213 echo " -l Path to a local copy of the ClickHouse repository."
14+ echo " -f Force pull from GitHub even in CI environment."
1315 echo " -h Display this help message."
1416 exit 0
1517 ;;
1618 l)
1719 local_path=" $OPTARG "
1820 ;;
21+ f)
22+ force_pull=true
23+ ;;
1924 \? )
2025 echo " Invalid option: -$OPTARG " >&2
2126 exit 1
2227 ;;
2328 esac
2429 done
25-
26- echo " $local_path "
2730}
2831
2932# Copy files/folders using rsync (or fallback to cp)
@@ -100,10 +103,14 @@ main() {
100103
101104 if [[ -z " $local_path " ]]; then
102105
103- if [[ " $CI " == " true" ]]; then
106+ # Check if in CI environment and force_pull is not set
107+ if [[ " $CI " == " true" && " $force_pull " == " false" ]]; then
104108 echo " CI environment detected, expecting /ClickHouse without having to pull the repo"
105109 copy_docs_locally " /ClickHouse"
106110 else
111+ if [[ " $force_pull " == " true" && " $CI " == " true" ]]; then
112+ echo " Force pull enabled, ignoring CI environment and pulling from GitHub"
113+ fi
107114 git clone --depth 1 --branch master https://github.com/ClickHouse/ClickHouse
108115 # Copy docs from cloned repository
109116 copy_docs_locally " $( pwd) /ClickHouse"
You can’t perform that action at this time.
0 commit comments