Skip to content

Commit

Permalink
Merge pull request #73 from craigcomstock/ENT-11158
Browse files Browse the repository at this point in the history
ENT-11158: cf-remote deploy now looks for masterfiles in current working directory
  • Loading branch information
olehermanse committed Jan 11, 2024
2 parents 8090dc5 + 10b1e8a commit 60ddb1d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cf_remote/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,14 +800,20 @@ def deploy(hubs, masterfiles):
):
masterfiles = "out/masterfiles.tgz"
print("Found cfbs policy set: '{}'".format(masterfiles))
elif masterfiles.startswith(("http://", "https://")):
elif masterfiles and masterfiles.startswith(("http://", "https://")):
urls = [masterfiles]
paths = _download_urls(urls)
assert len(paths) == 1
masterfiles = paths[0]
log.debug("Deploying downloaded: %s" % masterfiles)
else:
if not masterfiles:
masterfiles = "."
if not (os.path.isfile("promises.cf") or os.path.isfile("promises.cf.in")):
user_error("No cfbs or masterfiles policy set found")

masterfiles = os.path.abspath(os.path.expanduser(masterfiles))
print("Found masterfiles policy set: '{}'".format(masterfiles))
log.debug("Deploy path expanded to: %s" % masterfiles)

masterfiles = masterfiles.rstrip("/")
Expand Down

0 comments on commit 60ddb1d

Please sign in to comment.