We would like to switch between different dev hubs in our sfdx 2gp project. E.g. we have one dev hub representing our BPO org (for major releases) and couple free registered dev hubs to play around with and create adhoc package versions without validation for testing purposes etc.
Since every dev hub is linked with different namespace (i.e. packaging org), has different package id created there etc, we would like to have separate sfdx-project.json per each dev hub to keep there all these hub-specific configs like namespace, package id, ancestor id, package version etc (while still part of the file describing project structure in terms of packaging folders would be the same in each project file, i.e. duplicated).
The question here: is there any way to change the name of default project config file in runtime from sfdx-project.json to e.g. sfdx-project.json.testDevHub, maybe by setting some env variable or via sfdx config set key command?
Looking through docs we haven't found a way to do that so far - the only option is just to rewrite sfdx-project.json file content in runtime, and then restore it back. Is there any better way to achive this? Any help would be appreciated.