Skip to content

Commit

Permalink
allow HEAD branches to be named master or main
Browse files Browse the repository at this point in the history
  • Loading branch information
gaede authored and tmadlener committed Dec 21, 2023
1 parent 2659df8 commit 6e03092
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ilcsoft/baseilc.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,9 @@ def downloadSources(self):
elif self.download.type[:6] == "GitHub":
if self.version =="HEAD" or self.version =="dev" or self.version =="devel" or self.version =="master" or self.download.branch:
#clone the whole repo into the directory
branch = 'master' if self.download.branch is None else self.download.branch
cmd="git clone -b %s https://github.com/%s/%s.git %s" % (branch, self.download.gituser, self.download.gitrepo, self.version)
branch = '' if self.download.branch is None else '-b ' + self.download.branch

cmd="git clone %s https://github.com/%s/%s.git %s" % (branch, self.download.gituser, self.download.gitrepo, self.version)
print("Executing command:",cmd)
if os_system( cmd ) != 0:
self.abort( "Problems occurred during execution of " + cmd + " [!!ERROR!!]")
Expand Down

0 comments on commit 6e03092

Please sign in to comment.