This repository was archived by the owner on Mar 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,11 @@ def replace_text(text: str) -> str:
6868
6969 branches = [x [2 :] for x in str (git ("branch" , "--list" )).split ("\n " )]
7070
71- if "skeleton-merge-branch" in branches :
72- print ("Merge branch already exists. Skipping creation..." )
71+ if f"{ MERGE_BRANCH } " in branches :
72+ raise Exception (
73+ f"{ MERGE_BRANCH } already exists. \
74+ Please run 'dls-python3-skeleton clean' to remove it."
75+ )
7376 else :
7477 with GitTemporaryDirectory () as git_tmp :
7578 # Clone existing repo into tmp so we don't mess up if we fail
@@ -190,11 +193,11 @@ def clean_repo(args):
190193
191194 branches = [x [2 :] for x in str (git ("branch" , "--list" )).split ("\n " )]
192195 assert (
193- "skeleton-merge-branch " in branches
194- ), "Expected skeleton-merge-branch to be in existing repo"
196+ f" { MERGE_BRANCH } " in branches
197+ ), f "Expected { MERGE_BRANCH } to be in existing repo"
195198
196- git ("branch" , "-D" , "skeleton-merge-branch " )
197- print ("skeleton-merge-branch deleted from existing repo" )
199+ git ("branch" , "-D" , f" { MERGE_BRANCH } " )
200+ print (f" { MERGE_BRANCH } deleted from existing repo" )
198201
199202
200203def main (args = None ):
You can’t perform that action at this time.
0 commit comments