Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
git-commit-id#317: add the new transformation rule engine to the demo…
Browse files Browse the repository at this point in the history
…-profile that is being executed; note Maven is not required to use the constructer to create a Transformation rule and thus we need to set the applyRule and actionRule
  • Loading branch information
TheSnoozer committed Sep 24, 2017
1 parent 6557ed6 commit 9d93796
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ It's really simple to setup this plugin; below is a sample pom that you may base
<!-- example: apply replacement only to the specific property git.branch and replace '/' with '-'
<replacementProperty>
<property>git.branch</property>
<propertyOutputSuffix>something<propertyOutputSuffix>
<propertyOutputSuffix>something</propertyOutputSuffix>
<token>^([^\/]*)\/([^\/]*)$</token>
<value>$1-$2</value>
<regex>true</regex>
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,15 @@
<replacementProperties>
<replacementProperty>
<property>git.branch</property>
<propertyOutputSuffix>something</propertyOutputSuffix>
<token>^([^\/]*)\/([^\/]*)$</token>
<value>$1-$2</value>
<transformationRules>
<transformationRule>
<apply>BEFORE</apply>
<action>UPPER_CASE</action>
</transformationRule>
</transformationRules>
</replacementProperty>
</replacementProperties>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/pl/project13/maven/git/TransformationRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public String getApply() {
}

public void setApply(String apply) {
this.applyRule = ApplyEnum.valueOf(apply);
this.apply = apply;
}

Expand All @@ -101,6 +102,7 @@ public String getAction() {
}

public void setAction(String action) {
this.actionRule = ActionEnum.valueOf(action);
this.action = action;
}

Expand Down

0 comments on commit 9d93796

Please sign in to comment.