|
16 | 16 |
|
17 | 17 | set -e |
18 | 18 |
|
19 | | -# Set this: |
20 | | -base_folder=/opt/github |
| 19 | +base_folder=$HOME/github-automation |
| 20 | +github_organization="boostorg" |
| 21 | +list_of_repos="${github_organization}/boostlook ${github_organization}/website-v2-docs ${github_organization}/website-v2" |
21 | 22 |
|
22 | | -list_of_repos="boostorg/boostlook boostorg/website-v2-docs boostorg/website-v2" |
| 23 | +mkdir -p ${base_folder}/${github_organization} |
| 24 | +cd ${base_folder}/${github_organization} |
| 25 | +echo "It's recommended to not modify anything in this directory." > README.md |
| 26 | +echo "It will be reserved for automation scripts." >> README.md |
| 27 | +echo "During day to day work use any other directories such as $HOME/github, /opt/, $HOME/opt/ etc." >> README.md |
23 | 28 |
|
24 | 29 | for repo in ${list_of_repos}; do |
| 30 | + echo "" |
| 31 | + echo "=====================================" |
| 32 | + echo "REPOSITORY: ${repo}" |
| 33 | + echo "=====================================" |
| 34 | + echo "" |
| 35 | + cd ${base_folder}/${github_organization} |
25 | 36 | repo_dir="${base_folder}/${repo}" |
26 | 37 | if [ ! -d "${repo_dir}" ]; then |
27 | | - echo "The directory of ${repo} does not exist at ${repo_dir}." |
28 | | - echo "This script assumes you have already checked out the codebase locally." |
29 | | - echo "Check if you have configured the variable base_folder correctly." |
30 | | - echo "Exiting." |
31 | | - exit 1 |
| 38 | + git clone -b develop https://github.com/$repo |
32 | 39 | fi |
33 | | - |
34 | 40 | cd "${repo_dir}" |
35 | 41 |
|
36 | 42 | echo "checking 'git diff'" |
@@ -86,7 +92,7 @@ for repo in ${list_of_repos}; do |
86 | 92 | echo "Running 'git push' from the master branch" |
87 | 93 | git push |
88 | 94 |
|
89 | | - if [ "$repo" = "boostorg/boostlook" ]; then |
| 95 | + if [ "$repo" = "${github_organization}/boostlook" ]; then |
90 | 96 | echo "Deployed boostlook. Waiting 5 minutes before proceeding, since that triggers github actions on other repos." |
91 | 97 | echo "This step may be adjusted later." |
92 | 98 | sleep 300 |
|
0 commit comments