Skip to content

Commit

Permalink
feat: Add Dynamic Versioning from SCM goal
Browse files Browse the repository at this point in the history
  • Loading branch information
jimisola committed May 28, 2024
1 parent 6249e56 commit 90ac453
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assert mavenLogFile.exists() : "Maven log file does not exist"
def logContent = mavenLogFile.text

// Define a pattern to match the version output
def versionPattern = /\[INFO\] Setting <project.version> to: (.+)/
def versionPattern = /\[INFO\] <project.version> set to: (.+)/
def matcher = (logContent =~ versionPattern)
assert matcher.find() : "Version information not found in log file"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assert mavenLogFile.exists() : "Maven log file does not exist"
def logContent = mavenLogFile.text

// Define a pattern to match the version output
def versionPattern = /\[INFO\] Setting <project.version> to: (.+)/
def versionPattern = /\[INFO\] <project.version> set to: (.+)/
def matcher = (logContent =~ versionPattern)
assert matcher.find() : "Version information not found in log file"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assert mavenLogFile.exists() : "Maven log file does not exist"
def logContent = mavenLogFile.text

// Define a pattern to match the version output
def versionPattern = /\[INFO\] Setting <project.version> to: (.+)/
def versionPattern = /\[INFO\] <project.version> set to: (.+)/
def matcher = (logContent =~ versionPattern)
assert matcher.find() : "Version information not found in log file"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assert mavenLogFile.exists() : "Maven log file does not exist"
def logContent = mavenLogFile.text

// Define a pattern to match the version output
def versionPattern = /\[INFO\] Setting <project.version> to: (.+)/
def versionPattern = /\[INFO\] <project.version> set to: (.+)/
def matcher = (logContent =~ versionPattern)
assert matcher.find() : "Version information not found in log file"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assert mavenLogFile.exists() : "Maven log file does not exist"
def logContent = mavenLogFile.text

// Define a pattern to match the version output
def versionPattern = /\[INFO\] Setting <project.version> to: (.+)/
def versionPattern = /\[INFO\] <project.version> set to: (.+)/
def matcher = (logContent =~ versionPattern)
assert matcher.find() : "Version information not found in log file"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assert mavenLogFile.exists() : "Maven log file does not exist"
def logContent = mavenLogFile.text

// Define a pattern to match the version output
def versionPattern = /\[INFO\] Setting <project.version> to: (.+)/
def versionPattern = /\[INFO\] <project.version> set to: (.+)/
def matcher = (logContent =~ versionPattern)
assert matcher.find() : "Version information not found in log file"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public void execute() throws MojoExecutionException {
}

String version = vi.toString();
getLog().info("Setting <project.version> to: " + version);
project.setVersion(version);
getLog().info("<project.version> set to: " + project.getVersion());
}

/**
Expand Down

0 comments on commit 90ac453

Please sign in to comment.