Skip to content

Commit 9074c47

Browse files
Removed stage-2 folder from build process
For larger addons, this becomes a hinderence, and we already clean stage-1 anyway. Let's just use the stage one folder for actions.
1 parent 2fbd006 commit 9074c47

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

bpy_addon_build/build_context.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,9 @@ def combine_with_build(path: Path) -> Path:
127127

128128
shutil.copytree(ADDON_FOLDER, combine_with_build(STAGE_ONE))
129129
if len(self.defined_actions):
130-
STAGE_TWO = BUILD_DIR.joinpath(Path("stage-2"))
131-
if not STAGE_TWO.exists():
132-
STAGE_TWO.mkdir()
133-
if STAGE_TWO.exists():
134-
shutil.rmtree(STAGE_TWO)
135-
STAGE_TWO.mkdir()
136-
137-
shutil.copytree(
138-
combine_with_build(STAGE_ONE), combine_with_build(STAGE_TWO)
139-
)
140130
for act in self.defined_actions:
141-
self.action(act, STAGE_TWO.joinpath(ADDON_FOLDER.name))
142-
shutil.make_archive(str(combine_with_build(BUILD_DIR)), "zip", STAGE_TWO)
143-
else:
144-
shutil.make_archive(str(combine_with_build(BUILD_DIR)), "zip", STAGE_ONE)
131+
self.action(act, STAGE_ONE.joinpath(ADDON_FOLDER.name))
132+
shutil.make_archive(str(combine_with_build(BUILD_DIR)), "zip", STAGE_ONE)
145133

146134
def action(self, action: str, folder: Path) -> None:
147135
"""

0 commit comments

Comments
 (0)