-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Not everyone likes the convention of tags being just the raw version strings. Additionally, users with monorepos often have different version needs in different projects, where they might want to tag versions like "project-a/1.2.3" to provide different namespaces for different projects. This now exposes that functionality through the ReckonExtension. Fixes #54
- Loading branch information
1 parent
e2307fa
commit 998be79
Showing
11 changed files
with
154 additions
and
31 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
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
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
12 changes: 12 additions & 0 deletions
12
reckon-core/src/main/java/org/ajoberstar/reckon/core/VersionTagParser.java
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 @@ | ||
package org.ajoberstar.reckon.core; | ||
|
||
import java.util.Optional; | ||
|
||
@FunctionalInterface | ||
public interface VersionTagParser { | ||
Optional<Version> parse(String tagName); | ||
|
||
static VersionTagParser getDefault() { | ||
return tagName -> Version.parse(tagName.replaceAll("^v", "")); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
reckon-core/src/main/java/org/ajoberstar/reckon/core/VersionTagWriter.java
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 @@ | ||
package org.ajoberstar.reckon.core; | ||
|
||
@FunctionalInterface | ||
public interface VersionTagWriter { | ||
String write(Version version); | ||
|
||
static VersionTagWriter getDefault() { | ||
return Version::toString; | ||
} | ||
} |
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
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
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
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
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
Oops, something went wrong.