@@ -194,18 +194,20 @@ def init_argparse():
194
194
print ('Failed to open template/' + project_dir + '/deployment_process.ocl to check for ActionTemplates' )
195
195
196
196
# Merge the template changes
197
- execute (['git' , 'clone' , new_repo_url_wth_creds ])
198
- execute (['git' , 'remote' , 'add' , 'upstream' , template_repo_name_url_with_creds ], cwd = new_repo )
199
- execute (['git' , 'fetch' , '--all' ], cwd = new_repo )
200
- execute (['git' , 'checkout' , '-b' , 'upstream-' + branch , 'upstream/' + branch ], cwd = new_repo )
197
+ repo_dir = 'repo'
198
+ os .mkdir (repo_dir )
199
+ execute (['git' , 'clone' , new_repo_url_wth_creds , repo_dir ])
200
+ execute (['git' , 'remote' , 'add' , 'upstream' , template_repo_name_url_with_creds ], cwd = repo_dir )
201
+ execute (['git' , 'fetch' , '--all' ], cwd = repo_dir )
202
+ execute (['git' , 'checkout' , '-b' , 'upstream-' + branch , 'upstream/' + branch ], cwd = repo_dir )
201
203
202
204
# Checkout the project branch, assuming "main" or "master" are already linked upstream
203
205
if branch != 'master' and branch != 'main' :
204
- execute (['git' , 'checkout' , '-b' , branch , 'origin/' + branch ], cwd = new_repo )
206
+ execute (['git' , 'checkout' , '-b' , branch , 'origin/' + branch ], cwd = repo_dir )
205
207
else :
206
- execute (['git' , 'checkout' , branch ], cwd = new_repo )
208
+ execute (['git' , 'checkout' , branch ], cwd = repo_dir )
207
209
208
- git_diff_out , _ , _ = execute (['git' , 'diff' , 'main...upstream-main' ], cwd = new_repo )
210
+ git_diff_out , _ , _ = execute (['git' , 'diff' , 'main...upstream-main' ], cwd = repo_dir )
209
211
210
212
if len (git_diff_out ) == 0 :
211
213
print ('This project is up to date with the upstream repo at ' + template_repo_name_url )
0 commit comments