GitHub Actions Iterations

This commit is contained in:
Semantic Versioner 2023-07-22 05:11:03 -04:00
parent 6a2b5da00b
commit 8b214aab3d
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
import re import re
import subprocess import subprocess
from typing import Union, List from typing import Union, List
from functools import cache from functools import lru_cache
import toml import toml
@ -88,7 +88,7 @@ class Git(SCM):
logger.debug(f"Tag Version: {version}") logger.debug(f"Tag Version: {version}")
return version return version
@cache @lru_cache(maxsize=None)
def get_branch(self) -> str: def get_branch(self) -> str:
""" """
Get the main branch Get the main branch
@ -97,7 +97,7 @@ class Git(SCM):
proc = self._run_command(self.git_bin, "rev-parse", "--abbrev-ref", "HEAD") proc = self._run_command(self.git_bin, "rev-parse", "--abbrev-ref", "HEAD")
return proc.stdout.rstrip() return proc.stdout.rstrip()
@cache @lru_cache(maxsize=None)
def get_merge_branch(self) -> Union[str, None]: def get_merge_branch(self) -> Union[str, None]:
""" """
Get the branches involved in the merge Get the branches involved in the merge

View File

@ -1,6 +1,6 @@
from typing import List from typing import List
from pathlib import Path from pathlib import Path
from functools import cache from functools import lru_cache
import configparser import configparser
import toml import toml
@ -8,7 +8,7 @@ import toml
from semver.exceptions import SemverException from semver.exceptions import SemverException
@cache @lru_cache(maxsize=None)
def get_settings() -> dict: def get_settings() -> dict:
""" """
Get the settings from the config file Get the settings from the config file