Substituted setup key in configuration through Makefile
This commit is contained in:
@@ -40,10 +40,6 @@ def install_repos(selected_repos, repositories_base_dir, bin_dir, all_repos, no_
|
|||||||
# Create the symlink using create_ink.
|
# Create the symlink using create_ink.
|
||||||
create_ink(repo, repositories_base_dir, bin_dir, all_repos, quiet=quiet, preview=preview)
|
create_ink(repo, repositories_base_dir, bin_dir, all_repos, quiet=quiet, preview=preview)
|
||||||
|
|
||||||
setup_cmd = repo.get("setup")
|
|
||||||
if setup_cmd:
|
|
||||||
run_command(setup_cmd, cwd=repo_dir, preview=preview)
|
|
||||||
|
|
||||||
# Check if a requirements.yml file exists and install additional packages.
|
# Check if a requirements.yml file exists and install additional packages.
|
||||||
req_file = os.path.join(repo_dir, "requirements.yml")
|
req_file = os.path.join(repo_dir, "requirements.yml")
|
||||||
if os.path.exists(req_file):
|
if os.path.exists(req_file):
|
||||||
@@ -78,3 +74,9 @@ def install_repos(selected_repos, repositories_base_dir, bin_dir, all_repos, no_
|
|||||||
if pip_packages:
|
if pip_packages:
|
||||||
cmd = "python3 -m pip install " + " ".join(pip_packages)
|
cmd = "python3 -m pip install " + " ".join(pip_packages)
|
||||||
run_command(cmd, preview=preview)
|
run_command(cmd, preview=preview)
|
||||||
|
|
||||||
|
# Check if a Makefile exists and run make.
|
||||||
|
makefile_path = os.path.join(repo_dir, "Makefile")
|
||||||
|
if os.path.exists(makefile_path):
|
||||||
|
print(f"Makefile found in {repo_identifier}, running 'make'...")
|
||||||
|
run_command("make", cwd=repo_dir, preview=preview)
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ def interactive_add(config,USER_CONFIG_PATH:str):
|
|||||||
new_entry["command"] = input("Command (optional, leave blank to auto-detect): ").strip()
|
new_entry["command"] = input("Command (optional, leave blank to auto-detect): ").strip()
|
||||||
new_entry["description"] = input("Description (optional): ").strip()
|
new_entry["description"] = input("Description (optional): ").strip()
|
||||||
new_entry["replacement"] = input("Replacement (optional): ").strip()
|
new_entry["replacement"] = input("Replacement (optional): ").strip()
|
||||||
new_entry["setup"] = input("Setup command (optional): ").strip()
|
|
||||||
new_entry["teardown"] = input("Teardown command (optional): ").strip()
|
new_entry["teardown"] = input("Teardown command (optional): ").strip()
|
||||||
new_entry["alias"] = input("Alias (optional): ").strip()
|
new_entry["alias"] = input("Alias (optional): ").strip()
|
||||||
# Allow the user to mark this entry as ignored.
|
# Allow the user to mark this entry as ignored.
|
||||||
|
|||||||
Reference in New Issue
Block a user