save a file to alocal folder and make it executable
This commit is contained in:
parent
e54626d971
commit
230cf99f06
8 changed files with 122 additions and 21 deletions
16
majordome/main.py
Normal file
16
majordome/main.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from pathlib import Path
|
||||
|
||||
from majordome.github_service import GithubConnector
|
||||
from majordome.settings import GithubSettings
|
||||
from majordome.software_repo import SoftwareRepo
|
||||
|
||||
settings = GithubSettings()
|
||||
github_service = GithubConnector(settings.token)
|
||||
|
||||
|
||||
def download_latest(
|
||||
url: str, asset_mnemonic: str, tag_mnemonic: str, destination: Path
|
||||
):
|
||||
software_repo = SoftwareRepo(url, github_service, tag_mnemonic, asset_mnemonic)
|
||||
asset = software_repo.download_latest_asset()
|
||||
destination.write_bytes(asset)
|
Loading…
Add table
Add a link
Reference in a new issue