Skip to content

Commit

Permalink
test: create bins dir on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Apr 23, 2024
1 parent 6e25de6 commit f5f085f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build-gsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Goreleaser

on:
push:
branches: [ master ]
tags:
- "*"

Expand Down
6 changes: 5 additions & 1 deletion scripts/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ def download(filename: str):
response = requests.get(file_info['browser_download_url'])
response.raise_for_status()

with open(get_bin_path(filename), 'wb') as f:
bin_path = get_bin_path(filename)

os.makedirs(os.path.dirname(bin_path), exist_ok=True)

with open(bin_path, 'wb') as f:
f.write(response.content)

print(f"Downloaded {filename}")
Expand Down

0 comments on commit f5f085f

Please sign in to comment.