split launcher source and build by component
This commit is contained in:
@@ -40,6 +40,18 @@ export type LauncherSource = {
|
||||
repository?: string | null;
|
||||
branch?: string | null;
|
||||
commitSha?: string | null;
|
||||
client?: {
|
||||
repository?: string | null;
|
||||
branch?: string | null;
|
||||
commitSha?: string | null;
|
||||
};
|
||||
backend?: {
|
||||
repository?: string | null;
|
||||
branch?: string | null;
|
||||
commitSha?: string | null;
|
||||
image?: string | null;
|
||||
dockerfile?: string | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type LauncherAppLink = {
|
||||
@@ -115,7 +127,14 @@ export function getLauncherSource() {
|
||||
return apiRequest<{ source: LauncherSource }>('/launcher/source');
|
||||
}
|
||||
|
||||
export function updateLauncherSource(input: { repository: string; branch?: string; commitSha?: string }) {
|
||||
export function updateLauncherSource(input: {
|
||||
target?: 'launcher-client' | 'launcher-backend';
|
||||
repository: string;
|
||||
branch?: string;
|
||||
commitSha?: string;
|
||||
image?: string;
|
||||
dockerfile?: string;
|
||||
}) {
|
||||
return apiRequest<{ source: LauncherSource }>('/launcher/source', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(input)
|
||||
@@ -127,6 +146,11 @@ export function listPlatformRepos(limit = 50) {
|
||||
.then((result) => result.repos);
|
||||
}
|
||||
|
||||
export function listStudioRepos(limit = 50) {
|
||||
return apiRequest<{ owner: string | null; repos: GiteaRepo[] }>(`/gitea/repos?owner=studio&limit=${limit}`)
|
||||
.then((result) => result.repos);
|
||||
}
|
||||
|
||||
export function listLauncherBuildJobs() {
|
||||
return apiRequest<LauncherBuildJob[]>('/launcher/builds');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user