What is the purpose of legacy_migration_task
?
#1101
-
Why is "legacy-migration" running? I haven't found documentation for it. % cargo make serve
[cargo-make] INFO - cargo make 0.37.12
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: serve
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
... I found this: # /src/lib/descriptor/makefiles/stable.toml
[config]
init_task = "init"
end_task = "end"
legacy_migration_task = "legacy-migration"
# ... I also found # /src/lib/descriptor/makefiles/deprecated.toml
[tasks.legacy-migration]
description = "Migrates deprecated environment variables."
category = "Deprecated"
private = true
condition = { env_true = ["CARGO_MAKE_RUN_DEPRECATED_MIGRATION"] }
env = { CARGO_MAKE_RUN_DEPRECATED_MIGRATION = false }
script = '''
#!@duckscript
fn <scope> migrate_env
new_var = get_env ${1}
old_var = get_env ${2}
if is_defined old_var
echo Old environment variable ${2} detected, please use ${1} instead.
set_env ${1} ${old_var}
else if is_defined new_var
set_env ${2} ${new_var}
end
end
migrate_env CARGO_MAKE_TEST_USE_MULTI_TEST_PHASES CARGO_MAKE_TEST_USE_MUTLI_TEST_PHASES
''' Based on understanding perhaps too little of the overall context, |
Beta Was this translation helpful? Give feedback.
Answered by
sagiegurari
Jul 6, 2024
Replies: 1 comment
-
sorry for late reply. i think i can drop it. it was used at the past to copy old config to new location. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
xpe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sorry for late reply. i think i can drop it. it was used at the past to copy old config to new location.