Skip to content

Commit 0e47054

Browse files
committed
[rolling release] Allow for creation of base and pr branches
A new base branch for sig-cloud needs to have a base created and a new branch {user}_sig-cloud such that we can generate a PR against the new branch.
1 parent a5b3a85 commit 0e47054

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

rolling-release-update.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,19 @@ def check_for_fips_protected_changes(repo, branch, common_tag):
167167
exit(1)
168168
else:
169169
print(f'Branch {new_rolling_branch_kernel} does not exists creating')
170+
results = subprocess.run(['git', 'checkout', '-b', new_rolling_branch_kernel], stderr=subprocess.PIPE,
171+
stdout=subprocess.PIPE, cwd=args.repo)
172+
if results.returncode != 0:
173+
print(results.stderr)
174+
exit(1)
170175

171-
results = subprocess.run(['git', 'checkout', '-b', new_rolling_branch_kernel], stderr=subprocess.PIPE,
176+
print('[rolling release update] Creating new branch for PR: ', f"{os.getlogin()}_{new_rolling_branch_kernel}")
177+
results = subprocess.run(['git', 'checkout', '-b', f"{os.getlogin()}_{new_rolling_branch_kernel}"], stderr=subprocess.PIPE,
172178
stdout=subprocess.PIPE, cwd=args.repo)
173179
if results.returncode != 0:
174180
print(results.stderr)
175181
exit(1)
182+
176183

177184
print('[rolling release update] Crating Map of all new commits from last rolling release fork')
178185
new_base_commit_map = {}

0 commit comments

Comments
 (0)