-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
106 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import argparse | ||
import sys | ||
import typing as t | ||
|
||
sys.stdout.reconfigure(encoding='utf-8') | ||
sys.stderr.reconfigure(encoding='utf-8') | ||
|
||
""" | ||
Alas installer | ||
""" | ||
|
||
|
||
def run_install(): | ||
from deploy.installer import run | ||
run() | ||
|
||
|
||
def run_print_test(): | ||
from deploy.Windows.installer_test import run | ||
run() | ||
|
||
|
||
def run_set(modify=t.List[str]) -> t.Dict[str, str]: | ||
data = {} | ||
for kv in modify: | ||
if "=" in kv: | ||
key, value = kv.split('=', maxsplit=1) | ||
data[key] = value | ||
|
||
from deploy.set import config_set | ||
return config_set(data) | ||
|
||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser(description="Alas installer") | ||
parser.add_argument( | ||
"--print-test", | ||
help="To print example installer outputs instead of making an actual installation", | ||
action="store_true", | ||
) | ||
parser.add_argument( | ||
"--set", | ||
help="Use key=value format to modify config/deploy.yaml\n" | ||
"Example: python installer.py --set Branch=dev", | ||
type=str, | ||
nargs="*", | ||
) | ||
args, _ = parser.parse_known_args() | ||
|
||
if args.set: | ||
run_set(args.set) | ||
elif args.print_test: | ||
run_print_test() | ||
else: | ||
run_install() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters