mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-16 15:17:21 -05:00
Completely rewrote the code, home builds locally rather on Gitlab, releases are done manually aswell
This commit is contained in:
@@ -19,17 +19,8 @@ const REPO_CONFIG = {
|
||||
'stream-api': { name: 'stream-api', branch: 'main' },
|
||||
};
|
||||
|
||||
function getGitLabToken() {
|
||||
const token = process.env.GITLAB_TOKEN || process.env.VYLA_GITLAB_TOKEN;
|
||||
if (!token) {
|
||||
throw new Error('GitLab token not found. Set GITLAB_TOKEN or VYLA_GITLAB_TOKEN environment variable.');
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
function clonePrivateRepo(repoConfig, targetDir) {
|
||||
const token = getGitLabToken();
|
||||
const repoUrl = `https://oauth2:${token}@gitlab.com/${GITLAB_GROUP}/${repoConfig.name}.git`;
|
||||
const repoUrl = `https://gitlab.com/${GITLAB_GROUP}/${repoConfig.name}.git`;
|
||||
|
||||
try {
|
||||
if (fs.existsSync(targetDir)) {
|
||||
@@ -37,8 +28,7 @@ function clonePrivateRepo(repoConfig, targetDir) {
|
||||
}
|
||||
|
||||
execSync(`git clone --depth 1 --branch ${repoConfig.branch} ${repoUrl} ${targetDir}`, {
|
||||
stdio: 'inherit',
|
||||
env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }
|
||||
stdio: 'inherit'
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user