Skip to content

Commit

Permalink
Fix tag ordering issues and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Jan 7, 2024
1 parent 64d8d9a commit 4a29ac0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = 'dev.lukebemish'
version = '1.2.3'
version = '1.2.4'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void mavenRelease(PublishingExtension publishing) {
}
}

public void mavenPulLRequest(PublishingExtension publishing) {
public void mavenPullRequest(PublishingExtension publishing) {
if (System.getenv(Constants.PR_NUMBER) != null) {
publishing.repositories(repositories -> {
repositories.maven(maven -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ public ManagedVersioningExtension(Project project) {
spec.getParameters().getArgs().set(List.of("rev-parse", "HEAD"));
spec.getParameters().getWorkingDir().set(this.getGitWorkingDir());
});
var tagName = project.getProviders().of(GitValueSource.class, spec -> {
spec.getParameters().getArgs().set(List.of("describe", "--tags", "--abbrev=0"));
spec.getParameters().getWorkingDir().set(this.getGitWorkingDir());
});
this.tagHash = project.getProviders().of(GitValueSource.class, spec -> {
spec.getParameters().getArgs().set(List.of("rev-list", "--tags", "--max-count=1"));
spec.getParameters().getArgs().set(List.of("rev-list", "-n", "1"));
spec.getParameters().getArgs().add(tagName);
spec.getParameters().getWorkingDir().set(this.getGitWorkingDir());
});
this.getTimestampFormat().convention("yyyy.MM.dd-HH.mm.ss");
Expand Down

0 comments on commit 4a29ac0

Please sign in to comment.