Split build into mainline and stable versions