-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Dynamic Versioning from SCM goal
- Loading branch information
1 parent
9b03590
commit 149dcad
Showing
43 changed files
with
885 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ons-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag | ||
invoker.buildResult = failure |
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>localhost</groupId> | ||
<artifactId>it-dynamic-versioning-scm-tag-0-commits-0-tags</artifactId> | ||
<version>${revision}</version> | ||
<packaging>pom</packaging> | ||
<name>ranges-update-report</name> | ||
<url>http://localhost/</url> | ||
</project> |
10 changes: 10 additions & 0 deletions
10
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/selector.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
try { | ||
// smoke test if we have a needed tools | ||
def gitVersion = "git --version".execute() | ||
gitVersion.consumeProcessOutput(System.out, System.out) | ||
gitVersion.waitFor() | ||
return gitVersion.exitValue() == 0 | ||
} catch (Exception e) { | ||
// some error occurs - we skip a test | ||
return false | ||
} |
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/setup.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
void exec(String command) { | ||
def proc = command.execute(null, basedir) | ||
proc.consumeProcessOutput(System.out, System.out) | ||
proc.waitFor() | ||
assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}" | ||
} | ||
|
||
def testFile = new File(basedir, 'test.txt') | ||
testFile << 'content' | ||
|
||
exec('git init') |
12 changes: 12 additions & 0 deletions
12
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-0-commits-0-tags/verify.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// check that property was set | ||
|
||
def mavenLogFile = new File(basedir, 'build.log') | ||
assert mavenLogFile.exists() : "Maven log file does not exist" | ||
|
||
// Read the log file | ||
def logContent = mavenLogFile.text | ||
|
||
// Define a pattern to match the version output | ||
def versionPattern = /Caused by: org.apache.maven.plugin.MojoExecutionException: SCM repo has no head\/commits\./ | ||
def matcher = (logContent =~ versionPattern) | ||
assert matcher.find() : "SCM repo should have no head/commits" |
1 change: 1 addition & 0 deletions
1
...ions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag |
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>localhost</groupId> | ||
<artifactId>it-dynamic-versioning-scm-tag-1-commit-0-tags</artifactId> | ||
<version>${revision}</version> | ||
<packaging>pom</packaging> | ||
<name>ranges-update-report</name> | ||
<url>http://localhost/</url> | ||
</project> |
10 changes: 10 additions & 0 deletions
10
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/selector.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
try { | ||
// smoke test if we have a needed tools | ||
def gitVersion = "git --version".execute() | ||
gitVersion.consumeProcessOutput(System.out, System.out) | ||
gitVersion.waitFor() | ||
return gitVersion.exitValue() == 0 | ||
} catch (Exception e) { | ||
// some error occurs - we skip a test | ||
return false | ||
} |
13 changes: 13 additions & 0 deletions
13
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/setup.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
void exec(String command) { | ||
def proc = command.execute(null, basedir) | ||
proc.consumeProcessOutput(System.out, System.out) | ||
proc.waitFor() | ||
assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}" | ||
} | ||
|
||
def testFile = new File(basedir, 'test.txt') | ||
testFile << 'content' | ||
|
||
exec('git init') | ||
exec('git add test.txt') | ||
exec('git commit -m initial-commit') |
19 changes: 19 additions & 0 deletions
19
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-1-commit-0-tags/verify.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// check that property was set | ||
|
||
def mavenLogFile = new File(basedir, 'build.log') | ||
assert mavenLogFile.exists() : "Maven log file does not exist" | ||
|
||
// Read the log file | ||
def logContent = mavenLogFile.text | ||
|
||
// Define a pattern to match the version output | ||
def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ | ||
def matcher = (logContent =~ versionPattern) | ||
assert matcher.find() : "Version information not found in log file" | ||
|
||
// Extract the version from the matched group | ||
def actualVersion = matcher[0][1] | ||
|
||
def expectedVersion = '0.0.1-1-SNAPSHOT' | ||
|
||
assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'" |
1 change: 1 addition & 0 deletions
1
...ons-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=-X ${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag |
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>localhost</groupId> | ||
<artifactId>it-dynamic-versioning-scm-tag-4-commits-1-vtag</artifactId> | ||
<version>${revision}</version> | ||
<packaging>pom</packaging> | ||
<name>ranges-update-report</name> | ||
<url>http://localhost/</url> | ||
</project> |
10 changes: 10 additions & 0 deletions
10
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/selector.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
try { | ||
// smoke test if we have a needed tools | ||
def gitVersion = "git --version".execute() | ||
gitVersion.consumeProcessOutput(System.out, System.out) | ||
gitVersion.waitFor() | ||
return gitVersion.exitValue() == 0 | ||
} catch (Exception e) { | ||
// some error occurs - we skip a test | ||
return false | ||
} |
27 changes: 27 additions & 0 deletions
27
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/setup.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
void exec(String command) { | ||
def proc = command.execute(null, basedir) | ||
proc.consumeProcessOutput(System.out, System.out) | ||
proc.waitFor() | ||
assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}" | ||
} | ||
|
||
def testFile = new File(basedir, 'test.txt') | ||
testFile << 'content' | ||
|
||
exec('git init') | ||
exec('git add test.txt') | ||
exec('git commit -m initial-commit') | ||
exec('git tag 1.1.1') | ||
exec('git tag') | ||
|
||
testFile << 'content2' | ||
exec('git add test.txt') | ||
exec('git commit -m commit_no2') | ||
|
||
testFile << 'content3' | ||
exec('git add test.txt') | ||
exec('git commit -m commit_no3') | ||
|
||
testFile << 'content4' | ||
exec('git add test.txt') | ||
exec('git commit -m commit_no4') |
19 changes: 19 additions & 0 deletions
19
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-4-commits-1-vtag/verify.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// check that property was set | ||
|
||
def mavenLogFile = new File(basedir, 'build.log') | ||
assert mavenLogFile.exists() : "Maven log file does not exist" | ||
|
||
// Read the log file | ||
def logContent = mavenLogFile.text | ||
|
||
// Define a pattern to match the version output | ||
def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ | ||
def matcher = (logContent =~ versionPattern) | ||
assert matcher.find() : "Version information not found in log file" | ||
|
||
// Extract the version from the matched group | ||
def actualVersion = matcher[0][1] | ||
|
||
def expectedVersion = '1.1.2-4-SNAPSHOT' | ||
|
||
assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'" |
2 changes: 2 additions & 0 deletions
2
...ions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-env-use-version/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag -DuseVersion=9.9.9-9 | ||
invoker.environmentVariables.DV_SCM_PLUGIN_USE_VERSION = 5.5.5-5 |
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-env-use-version/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>localhost</groupId> | ||
<artifactId>it-dynamic-versioning-scm-tag-env-use-version</artifactId> | ||
<version>${revision}</version> | ||
<packaging>pom</packaging> | ||
<name>ranges-update-report</name> | ||
<url>http://localhost/</url> | ||
</project> |
10 changes: 10 additions & 0 deletions
10
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-env-use-version/selector.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
try { | ||
// smoke test if we have a needed tools | ||
def gitVersion = "git --version".execute() | ||
gitVersion.consumeProcessOutput(System.out, System.out) | ||
gitVersion.waitFor() | ||
return gitVersion.exitValue() == 0 | ||
} catch (Exception e) { | ||
// some error occurs - we skip a test | ||
return false | ||
} |
15 changes: 15 additions & 0 deletions
15
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-env-use-version/setup.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
void exec(String command) { | ||
def proc = command.execute(null, basedir) | ||
proc.consumeProcessOutput(System.out, System.out) | ||
proc.waitFor() | ||
assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}" | ||
} | ||
|
||
|
||
def testFile = new File(basedir, 'test.txt') | ||
testFile << 'content' | ||
|
||
exec('git init') | ||
exec('git add test.txt') | ||
exec('git commit -m initial-commit') |
19 changes: 19 additions & 0 deletions
19
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-env-use-version/verify.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// check that property was set | ||
|
||
def mavenLogFile = new File(basedir, 'build.log') | ||
assert mavenLogFile.exists() : "Maven log file does not exist" | ||
|
||
// Read the log file | ||
def logContent = mavenLogFile.text | ||
|
||
// Define a pattern to match the version output | ||
def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ | ||
def matcher = (logContent =~ versionPattern) | ||
assert matcher.find() : "Version information not found in log file" | ||
|
||
// Extract the version from the matched group | ||
def actualVersion = matcher[0][1] | ||
|
||
def expectedVersion = '5.5.5-5' | ||
|
||
assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'" |
1 change: 1 addition & 0 deletions
1
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag |
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>localhost</groupId> | ||
<artifactId>it-dynamic-versioning-scm-tag-latest-commit</artifactId> | ||
<version>${revision}</version> | ||
<packaging>pom</packaging> | ||
<name>ranges-update-report</name> | ||
<url>http://localhost/</url> | ||
</project> |
10 changes: 10 additions & 0 deletions
10
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/selector.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
try { | ||
// smoke test if we have a needed tools | ||
def gitVersion = "git --version".execute() | ||
gitVersion.consumeProcessOutput(System.out, System.out) | ||
gitVersion.waitFor() | ||
return gitVersion.exitValue() == 0 | ||
} catch (Exception e) { | ||
// some error occurs - we skip a test | ||
return false | ||
} |
14 changes: 14 additions & 0 deletions
14
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/setup.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
void exec(String command) { | ||
def proc = command.execute(null, basedir) | ||
proc.consumeProcessOutput(System.out, System.out) | ||
proc.waitFor() | ||
assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}" | ||
} | ||
|
||
def testFile = new File(basedir, 'test.txt') | ||
testFile << 'content' | ||
|
||
exec('git init') | ||
exec('git add test.txt') | ||
exec('git commit -m initial-commit') | ||
exec('git tag v1.1.1') |
19 changes: 19 additions & 0 deletions
19
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-latest-commit/verify.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// check that property was set | ||
|
||
def mavenLogFile = new File(basedir, 'build.log') | ||
assert mavenLogFile.exists() : "Maven log file does not exist" | ||
|
||
// Read the log file | ||
def logContent = mavenLogFile.text | ||
|
||
// Define a pattern to match the version output | ||
def versionPattern = /\[INFO\] Property 'revision' set to: (.+)/ | ||
def matcher = (logContent =~ versionPattern) | ||
assert matcher.find() : "Version information not found in log file" | ||
|
||
// Extract the version from the matched group | ||
def actualVersion = matcher[0][1] | ||
|
||
def expectedVersion = '1.1.1' | ||
|
||
assert actualVersion == expectedVersion : "Expected version '${expectedVersion}', but found '${actualVersion}'" |
1 change: 1 addition & 0 deletions
1
...aven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set-version-from-scm-tag -DappendSnapshot=false |
11 changes: 11 additions & 0 deletions
11
versions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>localhost</groupId> | ||
<artifactId>it-dynamic-versioning-scm-tag-param-append-snapshot</artifactId> | ||
<version>${revision}</version> | ||
<packaging>pom</packaging> | ||
<name>ranges-update-report</name> | ||
<url>http://localhost/</url> | ||
</project> |
10 changes: 10 additions & 0 deletions
10
...s-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/selector.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
try { | ||
// smoke test if we have a needed tools | ||
def gitVersion = "git --version".execute() | ||
gitVersion.consumeProcessOutput(System.out, System.out) | ||
gitVersion.waitFor() | ||
return gitVersion.exitValue() == 0 | ||
} catch (Exception e) { | ||
// some error occurs - we skip a test | ||
return false | ||
} |
13 changes: 13 additions & 0 deletions
13
...ions-maven-plugin/src/it/it-dynamic-versioning-scm-tag-param-append-snapshot/setup.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
void exec(String command) { | ||
def proc = command.execute(null, basedir) | ||
proc.consumeProcessOutput(System.out, System.out) | ||
proc.waitFor() | ||
assert proc.exitValue() == 0 : "Command '${command}' returned status: ${proc.exitValue()}" | ||
} | ||
|
||
def testFile = new File(basedir, 'test.txt') | ||
testFile << 'content' | ||
|
||
exec('git init') | ||
exec('git add test.txt') | ||
exec('git commit -m initial-commit') |
Oops, something went wrong.