TUN-8585: Avoid creating GH client when dry-run is true

- copy exe files from windows build
This commit is contained in:
lneto 2024-08-05 14:27:56 +01:00
parent bd9e020df9
commit 86f33005b9
2 changed files with 15 additions and 13 deletions

View File

@ -15,4 +15,5 @@ for arch in ${windowsArchs[@]}; do
make cloudflared-msi make cloudflared-msi
# Copy msi into final directory # Copy msi into final directory
mv cloudflared-$VERSION-$arch.msi $FINAL_ARTIFACT_DIR/cloudflared-windows-$arch.msi mv cloudflared-$VERSION-$arch.msi $FINAL_ARTIFACT_DIR/cloudflared-windows-$arch.msi
cp $BUILT_ARTIFACT_DIR/cloudflared-windows-$arch.exe $FINAL_ARTIFACT_DIR/cloudflared-windows-$arch.exe
done done

View File

@ -214,9 +214,6 @@ def main():
""" Attempts to upload Asset to Github Release. Creates Release if it doesn't exist """ """ Attempts to upload Asset to Github Release. Creates Release if it doesn't exist """
try: try:
args = parse_args() args = parse_args()
client = Github(args.api_key)
repo = client.get_repo(CLOUDFLARED_REPO)
release = get_or_create_release(repo, args.release_version, args.dry_run)
if args.dry_run: if args.dry_run:
if os.path.isdir(args.path): if os.path.isdir(args.path):
@ -229,6 +226,10 @@ def main():
else: else:
logging.error("dryrun failed") logging.error("dryrun failed")
return return
else:
client = Github(args.api_key)
repo = client.get_repo(CLOUDFLARED_REPO)
release = get_or_create_release(repo, args.release_version, args.dry_run)
if os.path.isdir(args.path): if os.path.isdir(args.path):
onlyfiles = [f for f in listdir(args.path) if isfile(join(args.path, f))] onlyfiles = [f for f in listdir(args.path) if isfile(join(args.path, f))]