Skip to content

Commit

Permalink
fix(cli): Should skip if no lds version for the feature changes. (#3231)
Browse files Browse the repository at this point in the history
#### Motivation

Just found we missing a skip for no version updates.

#### Modification

Add a skip if no version changes

#### Checklist

_If not applicable, provide explanation of why._

- [ ] Tests updated
- [ ] Docs updated
- [ ] Issue linked in Title
  • Loading branch information
Wentao-Kuang authored Apr 11, 2024
1 parent e27cd12 commit 955ffb9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/cli/src/cli/config/config.diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ export function getVectorChanges(newLayer: StacLink | undefined, existingLayer:
if (newLayer != null && existingLayer != null) {
const featureChange = Number(newLayer['lds:feature_count']) - Number(existingLayer['lds:feature_count']);

if (newLayer['lds:version'] === existingLayer['lds:version'] && featureChange !== 0) {
if (newLayer['lds:version'] === existingLayer['lds:version']) {
// Alert if feature changed with no version bump.
return `🟥🟥🟥🟥 Feature Change Detected ${newLayer['lds:name']} - version: ${newLayer['lds:version']} features: ${newLayer['lds:feature_count']} (+${featureChange}) 🟥🟥🟥🟥`;
if (featureChange !== 0) {
return `🟥🟥🟥🟥 Feature Change Detected ${newLayer['lds:name']} - version: ${newLayer['lds:version']} features: ${newLayer['lds:feature_count']} (+${featureChange}) 🟥🟥🟥🟥`;
}
return null;
}

if (featureChange >= 0) {
Expand Down

0 comments on commit 955ffb9

Please sign in to comment.