0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(cli): supports latest version for db alteration (#2177)

This commit is contained in:
Gao Sun 2022-10-17 23:36:16 +08:00 committed by GitHub
parent fd50304f5f
commit c492058a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,9 @@ export const chooseAlterationsByVersion = async (
.filter((version, index, self) => index === self.findIndex((another) => eq(version, another))) .filter((version, index, self) => index === self.findIndex((another) => eq(version, another)))
.slice() .slice()
.sort((i, j) => compare(j, i)); .sort((i, j) => compare(j, i));
const initialSemVersion = conditional(initialVersion && new SemVer(initialVersion)); const initialSemVersion = conditional(
initialVersion && initialVersion !== latestTag && new SemVer(initialVersion)
);
if (!versions[0]) { if (!versions[0]) {
return []; return [];