Skip to content

Commit

Permalink
fix: patch paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nullishamy committed May 28, 2024
1 parent c4e6c98 commit 8830845
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sources/build/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def execute_build(git_root: str, args: Namespace):
src_dir = colloid_tmp_dir + "/src"

if args.patch:
apply_colloid_patches(colloid_tmp_dir)
patch_dir = git_root + "/sources//patches/colloid/"
apply_colloid_patches(colloid_tmp_dir, patch_dir)

if args.zip:
output_format = "zip"
Expand Down
4 changes: 2 additions & 2 deletions sources/build/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import subprocess
from .logger import logger

def apply_colloid_patches(colloid_dir):
def apply_colloid_patches(colloid_dir, patch_dir):
if os.path.isfile(colloid_dir + "/.patched"):
logger.info(
f'Patches seem to be applied, remove "{colloid_dir}/.patched" to force application (this may fail)'
Expand All @@ -19,7 +19,7 @@ def apply_colloid_patches(colloid_dir):
"sass-palette-latte.patch",
"sass-palette-macchiato.patch",
]:
path = f"./patches/colloid/{patch}"
path = f"{patch_dir}/{patch}"
logger.info(f"Applying patch '{patch}', located at '{path}'")
subprocess.check_call(
["git", "apply", path, "--directory", os.path.basename(colloid_dir)])
Expand Down

0 comments on commit 8830845

Please sign in to comment.