Skip to content

Commit

Permalink
fix: AMI versioning is broken. (renovatebot#13740)
Browse files Browse the repository at this point in the history
  • Loading branch information
danports authored and ademar59 committed Jan 24, 2022
1 parent 85d197e commit 13f169f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions lib/versioning/aws-machine-image/index.spec.ts
Expand Up @@ -43,9 +43,12 @@ describe('versioning/aws-machine-image/index', () => {
});
});
describe('isGreaterThan(version1, version2)', () => {
it('should return false', () => {
expect(aws.isGreaterThan('ami-00', 'ami-99')).toBeFalse();
expect(aws.isGreaterThan('ami-99', 'ami-00')).toBeFalse();
it('should return true', () => {
// Since we can't compare AMI IDs directly, we consider any version
// greater than any other version so that updates will be generated.
// https://github.com/renovatebot/renovate/discussions/13739
expect(aws.isGreaterThan('ami-00', 'ami-99')).toBeTrue();
expect(aws.isGreaterThan('ami-99', 'ami-00')).toBeTrue();
});
});
});
2 changes: 1 addition & 1 deletion lib/versioning/aws-machine-image/index.ts
Expand Up @@ -24,7 +24,7 @@ class AwsMachineImageVersioningApi extends GenericVersioningApi {
}

protected override _compare(_version: string, _other: string): number {
return 0;
return 1;
}
}

Expand Down

0 comments on commit 13f169f

Please sign in to comment.