@@ -120,25 +120,25 @@ def parse_arguments():
120
120
return parser .parse_args ()
121
121
122
122
123
- def push_branch (directory , branch , tags , dry_run ):
123
+ def push_branch (directory , branch , tags , arguments ):
124
124
remote_branches = get_remote_b4_branches ()
125
125
126
126
if branch in remote_branches :
127
127
lib .utils .print_yellow (f"{ branch } already exists on remote, skipping..." )
128
128
else :
129
129
push_cmd = ['push' , '--set-upstream' , 'korg' , f"{ branch } :{ branch } " ]
130
- if dry_run :
130
+ if arguments . dry_run :
131
131
lib .utils .print_cmd (['git' , '-C' , directory , * push_cmd ])
132
132
else :
133
133
lib .utils .call_git_loud (directory , push_cmd )
134
134
135
135
for tag in tags :
136
- if tag in remote_branches [ branch ] :
136
+ if tag in remote_branches . get ( branch , []) :
137
137
lib .utils .print_yellow (f"{ tag } already exists on remote, skipping..." )
138
138
continue
139
139
140
140
push_cmd = ['push' , 'korg' , tag ]
141
- if dry_run :
141
+ if arguments . dry_run :
142
142
lib .utils .print_cmd (['git' , '-C' , directory , * push_cmd ])
143
143
else :
144
144
lib .utils .call_git_loud (directory , push_cmd )
0 commit comments