Skip to content

Commit

Permalink
Merge pull request #880 from dsalaza4/main
Browse files Browse the repository at this point in the history
refac(back): #879 deprecate registry
  • Loading branch information
dsalaza4 authored Jul 19, 2022
2 parents ea57121 + 9a02ddc commit a4ead36
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ in
__argNixUnstable__ = __nixpkgs__.nixUnstable;
};
entrypoint = ''
__MAKES_REGISTRY__=__argMakesSrc__/src/cli/main/registry.json \
__MAKES_SRC__=__argMakesSrc__ \
__NIX_STABLE__=__argNixStable__ \
__NIX_UNSTABLE__=__argNixUnstable__ \
Expand Down
12 changes: 0 additions & 12 deletions src/cli/main/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
VERSION: str = "22.08"

# Environment
__MAKES_REGISTRY__: str = environ["__MAKES_REGISTRY__"]
__MAKES_SRC__: str = environ["__MAKES_SRC__"]
__NIX_STABLE__: str = environ["__NIX_STABLE__"]
__NIX_UNSTABLE__: str = environ["__NIX_UNSTABLE__"]
Expand Down Expand Up @@ -207,7 +206,6 @@ def _clone_src(src: str) -> str:
head = src
else:
_add_safe_directory()
src = _clone_src_apply_registry(src)
if (
(match := _clone_src_github(src))
or (match := _clone_src_gitlab(src))
Expand Down Expand Up @@ -274,16 +272,6 @@ def _clone_src_git_worktree_add(remote: str, head: str) -> None:
CON.out(head)


def _clone_src_apply_registry(src: str) -> str:
with open(__MAKES_REGISTRY__, encoding="utf-8") as file:
registry = json.load(file)

for to_, from_ in registry.items():
src = re.sub(from_, to_, src)

return src


def _clone_src_github(src: str) -> Optional[Tuple[str, str, str]]:
regex = r"^github:(?P<owner>.*)/(?P<repo>.*)@(?P<rev>.*)$"

Expand Down
4 changes: 0 additions & 4 deletions src/cli/main/registry.json

This file was deleted.

0 comments on commit a4ead36

Please sign in to comment.