mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 18:09:58 +00:00
TUN-8581: create dry run for github release
This commit is contained in:
@@ -17,7 +17,7 @@ import re
|
||||
from github import Github, GithubException, UnknownObjectException
|
||||
|
||||
FORMAT = "%(levelname)s - %(asctime)s: %(message)s"
|
||||
logging.basicConfig(format=FORMAT)
|
||||
logging.basicConfig(format=FORMAT, level=logging.INFO)
|
||||
|
||||
CLOUDFLARED_REPO = os.environ.get("GITHUB_REPO", "cloudflare/cloudflared")
|
||||
GITHUB_CONFLICT_CODE = "already_exists"
|
||||
@@ -219,7 +219,15 @@ def main():
|
||||
release = get_or_create_release(repo, args.release_version, args.dry_run)
|
||||
|
||||
if args.dry_run:
|
||||
logging.info("Skipping asset upload because of dry-run")
|
||||
if os.path.isdir(args.path):
|
||||
onlyfiles = [f for f in listdir(args.path) if isfile(join(args.path, f))]
|
||||
for filename in onlyfiles:
|
||||
binary_path = os.path.join(args.path, filename)
|
||||
logging.info("binary: " + binary_path)
|
||||
elif os.path.isfile(args.path):
|
||||
logging.info("binary: " + binary_path)
|
||||
else:
|
||||
logging.error("dryrun failed")
|
||||
return
|
||||
|
||||
if os.path.isdir(args.path):
|
||||
|
Reference in New Issue
Block a user