-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clean
support for Custom
deployment paths
#32
base: main
Are you sure you want to change the base?
Add clean
support for Custom
deployment paths
#32
Conversation
|
||
if (results.length === 0) { | ||
// Fallback logic | ||
return STANDARD_CLEAN_PATHS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this fallback is removed, getStandardCleanPaths
could be passed to cleanTask
instead since the full path is resolved without needing env var replacements. Going this route would mean that the cleanCollateralTask
could probably be deprecated/removed.
export const STANDARD_CLEAN_PATHS = [ | ||
'LOCALAPPDATA/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/PROJECT_NAME', | ||
'LOCALAPPDATA/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_resource_packs/PROJECT_NAME', | ||
'LOCALAPPDATA/Packages/Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/PROJECT_NAME', | ||
'LOCALAPPDATA/Packages/Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe/LocalState/games/com.mojang/development_resource_packs/PROJECT_NAME', | ||
]; | ||
|
||
export function getStandardCleanPaths() { | ||
const projectName = getOrThrowFromProcess('PROJECT_NAME'); | ||
const results = Object.values(getGameDeploymentRootPaths()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to note here is that getGameDeploymentRootPaths
doesn't use the APPDATA
path, it only uses LOCALAPPDATA
which would be a breaking change I suppose? I don't think the copyTask
task would work if LOCALAPPDATA
wasn't set correctly so I don't think this would actually be breaking anything.
The current implementation of
STANDARD_CLEAN_PATHS
does not have support for theCUSTOM_DEPLOYMENT_PATH
environment variable which is used whenMINECRAFT_PRODUCT="Custom"
. This change switches the logic to use the existinggetGameDeploymentRootPaths
helper method to better generate the clean paths.This change makes
clean
work out of the box on linux, as shown here: