feat: branch naming

This commit is contained in:
TrèsAbhi committed 2024-10-12 21:38:48 -05:00
1 parent a06fc87009
commit adf00a0bbd
4 files changed
+26 -14

No files matched your search

@@ -0,0 +1,16 @@
import { assertSecret } from '@blitzkit/core';
const BRANCH_NAMES: Record<string, string> = {
dev: 'beta',
opentest: 'opentest',
};
export function resolveBranchName() {
if (assertSecret(import.meta.env.MODE) === 'development') {
return 'dev';
} else {
return BRANCH_NAMES[assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH)] as
| string
| undefined;
}
}