Skip to content

Clean task doesn't have access to build configuration/code #80

@Xymanek

Description

@Xymanek

The clean task is currently a separate script, which is already problematic:

  • Fix mod project paths containing spaces #56 isn't applied to cleaning logic
  • clean_cooker_output.ps1 had to be a separate file (it's called from both clean and build) and duplicates logic from build:
    # TODO: duplicates the logic in build_common.ps1
    $actualTfcSuffix = "_$($modNameCanonical)_DLCTFC_XPACK_"
    $cookerOutputPath = [io.path]::combine($sdkPath, 'XComGame', 'Published', 'CookedPCConsole')
  • clean.ps1 is forced to use some flaky logic due to lack of access to project's ContentOptions.json
    # This needs to be before $srcDirectory\BuildCache is deleted - otherwise we will miss our collection maps
    # This is dumb, yes, but to fix this we need to rework how BuildProject is used from build.ps1 (and here)
    CleanModAssetCookerOutput $sdkPath $modName @("$srcDirectory\$modName\ContentForCook", "$srcDirectory\BuildCache\CollectionMaps")

Fixing this however requires significantly changing how individual projects consume X2MBC (and some internal refactor of X2MBC)

cc @robojumper

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions