Skip to content

Commit

Permalink
[MNG-7658] CI-friendly versions should only come from/rely on user pr…
Browse files Browse the repository at this point in the history
…operties

This closes #945
  • Loading branch information
michael-o committed Jan 1, 2023
1 parent a3f8823 commit 4e8773b
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,16 @@ public boolean isValidProperty(String property) {
|| SHA1_PROPERTY.equals(property);
}

// TODO This class MUST test for user properties and THEN for system properties
@Override
public void overwriteModelProperties(Properties modelProperties, ModelBuildingRequest request) {
if (request.getSystemProperties().containsKey(REVISION_PROPERTY)) {
modelProperties.put(REVISION_PROPERTY, request.getSystemProperties().get(REVISION_PROPERTY));
if (request.getUserProperties().containsKey(REVISION_PROPERTY)) {
modelProperties.put(REVISION_PROPERTY, request.getUserProperties().get(REVISION_PROPERTY));
}
if (request.getSystemProperties().containsKey(CHANGELIST_PROPERTY)) {
modelProperties.put(
CHANGELIST_PROPERTY, request.getSystemProperties().get(CHANGELIST_PROPERTY));
if (request.getUserProperties().containsKey(CHANGELIST_PROPERTY)) {
modelProperties.put(CHANGELIST_PROPERTY, request.getUserProperties().get(CHANGELIST_PROPERTY));
}
if (request.getSystemProperties().containsKey(SHA1_PROPERTY)) {
modelProperties.put(SHA1_PROPERTY, request.getSystemProperties().get(SHA1_PROPERTY));
if (request.getUserProperties().containsKey(SHA1_PROPERTY)) {
modelProperties.put(SHA1_PROPERTY, request.getUserProperties().get(SHA1_PROPERTY));
}
}
}

0 comments on commit 4e8773b

Please sign in to comment.