fetch latest version tag from docker hub (#11362)

closes #11352

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
nitin
2025-04-08 14:25:03 +05:30
committed by GitHub
parent 95eba07f6e
commit ea93ac6348
11 changed files with 273 additions and 77 deletions
@@ -1,12 +0,0 @@
export const checkTwentyVersionExists = async (
version: string,
): Promise<boolean> => {
try {
const response = await fetch(
`https://api.github.com/repos/twentyhq/twenty/releases/tags/v${version}`,
);
return response.status === 200;
} catch (error) {
return false;
}
};
@@ -1,11 +0,0 @@
export const fetchLatestTwentyRelease = async (): Promise<string> => {
try {
const response = await fetch(
'https://api.github.com/repos/twentyhq/twenty/releases/latest',
);
const data = await response.json();
return data.tag_name.replace('v', '');
} catch (error) {
return 'Could not fetch latest release';
}
};