1
Fork 0

bootstrap: rename 'user' profile to 'dist'

This commit is contained in:
clubby789 2023-06-26 20:17:08 +00:00
parent 6f8c27ae89
commit 85c4ea0138
7 changed files with 43 additions and 10 deletions

View file

@ -1052,7 +1052,13 @@ def bootstrap(args):
profile = RustBuild.get_toml_static(config_toml, 'profile')
if profile is not None:
include_file = 'config.{}.toml'.format(profile)
# Allows creating alias for profile names, allowing
# profiles to be renamed while maintaining back compatibility
# Keep in sync with `profile_aliases` in config.rs
profile_aliases = {
"user": "dist"
}
include_file = 'config.{}.toml'.format(profile_aliases.get(profile) or profile)
include_dir = os.path.join(rust_root, 'src', 'bootstrap', 'defaults')
include_path = os.path.join(include_dir, include_file)
# HACK: This works because `self.get_toml()` returns the first match it finds for a