fix(build): align runtime env acceptance gate
This commit is contained in:
@@ -183,11 +183,23 @@ run_fix20_acceptance_subset() {
|
|||||||
|| fail "acceptance: the default obfs type must not be re-declared in: $default_declarations"
|
|| fail "acceptance: the default obfs type must not be re-declared in: $default_declarations"
|
||||||
|
|
||||||
log_step "Acceptance: runtime env is derived from config, not literals"
|
log_step "Acceptance: runtime env is derived from config, not literals"
|
||||||
! grep -Eq 'HY2XS_HYSTERIA_OBFS_TYPE=(gecko|salamander)' orchestrator/src/config/env.ts \
|
# runtime env mappings live in runtimeEnvEntries(); renderRuntimeEnv only
|
||||||
|| fail "acceptance: renderRuntimeEnv must not print a hardcoded obfs type"
|
# serializes that shared list. Do not require the old inline interpolation.
|
||||||
grep -q 'HY2XS_HYSTERIA_OBFS_TYPE=\${config.hysteriaObfsType}' orchestrator/src/config/env.ts \
|
! grep -Eq \
|
||||||
|| fail "acceptance: renderRuntimeEnv must derive the obfs type from the parsed config"
|
'HY2XS_HYSTERIA_OBFS_TYPE=(gecko|salamander)' \
|
||||||
! grep -Eq '\|\|\s*"(gecko|salamander)"' orchestrator/src/config/env.ts \
|
orchestrator/src/config/env.ts \
|
||||||
|
|| fail "acceptance: runtime env must not contain a hardcoded obfs type"
|
||||||
|
grep -Eq \
|
||||||
|
'\["HY2XS_HYSTERIA_OBFS_TYPE",[[:space:]]*config\.hysteriaObfsType\]' \
|
||||||
|
orchestrator/src/config/env.ts \
|
||||||
|
|| fail "acceptance: runtimeEnvEntries must derive the obfs type from the parsed config"
|
||||||
|
grep -Eq \
|
||||||
|
'renderEnvFile\(runtimeEnvEntries\(config\)\)' \
|
||||||
|
orchestrator/src/config/env.ts \
|
||||||
|
|| fail "acceptance: renderRuntimeEnv must render the shared runtimeEnvEntries list"
|
||||||
|
! grep -Eq \
|
||||||
|
'\|\|[[:space:]]*"(gecko|salamander)"' \
|
||||||
|
orchestrator/src/config/env.ts \
|
||||||
|| fail "acceptance: env.ts must not carry its own obfs fallback default"
|
|| fail "acceptance: env.ts must not carry its own obfs fallback default"
|
||||||
|
|
||||||
log_step "Acceptance: package metadata records how the Hysteria version was chosen"
|
log_step "Acceptance: package metadata records how the Hysteria version was chosen"
|
||||||
|
|||||||
Reference in New Issue
Block a user