Skip to content

Commit

Permalink
Update dependency com.javiersc.hubdle to v0.7.1
Browse files Browse the repository at this point in the history
| datasource | package                                               | from  | to    |
| ---------- | ----------------------------------------------------- | ----- | ----- |
| maven      | com.javiersc.hubdle:com.javiersc.hubdle.gradle.plugin | 0.7.0 | 0.7.1 |
  • Loading branch information
renovate[bot] committed Jul 25, 2024
1 parent 526e9d9 commit b0c1ff2
Show file tree
Hide file tree
Showing 19 changed files with 91 additions and 175 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

### Updated

- `com.javiersc.hubdle:com.javiersc.hubdle.gradle.plugin -> 0.7.1`
- `gradle -> 8.9`
- `com.javiersc.hubdle:com.javiersc.hubdle.gradle.plugin -> 0.7.0`

## [0.5.1] - 2024-03-29

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ private constructor(
stageNum = null,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number == null && stageName.isBlank() -> {
invoke(
Expand All @@ -103,8 +102,7 @@ private constructor(
stageNum = null,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number == null && stageName.isNotBlank() && stage?.name.isNullOrBlank() -> {
invoke(
Expand All @@ -115,8 +113,7 @@ private constructor(
stageNum = incNum,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number == null && stageName.isNotBlank() && stageName == stage?.name -> {
invoke(
Expand All @@ -127,8 +124,7 @@ private constructor(
stageNum = stage.num?.inc(),
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number == null && stageName.isNotBlank() && stageName != stage?.name -> {
invoke(
Expand All @@ -139,8 +135,7 @@ private constructor(
stageNum = incNum,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number is Increase.Major && stageName.isBlank() -> {
invoke(
Expand All @@ -151,8 +146,7 @@ private constructor(
stageNum = null,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number is Increase.Minor && stageName.isBlank() -> {
invoke(
Expand All @@ -163,8 +157,7 @@ private constructor(
stageNum = null,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number is Increase.Patch && stageName.isBlank() -> {
invoke(
Expand All @@ -175,8 +168,7 @@ private constructor(
stageNum = null,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number is Increase.Major && stageName.isNotBlank() -> {
invoke(
Expand All @@ -187,8 +179,7 @@ private constructor(
stageNum = incNum,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number is Increase.Minor && stageName.isNotBlank() -> {
invoke(
Expand All @@ -199,8 +190,7 @@ private constructor(
stageNum = incNum,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
number is Increase.Patch && stageName.isNotBlank() -> {
invoke(
Expand All @@ -211,16 +201,14 @@ private constructor(
stageNum = incNum,
commits = commits,
hash = hash,
metadata = metadata
)
metadata = metadata)
}
else -> null
} ?: gradleVersionError("There were an error configuring the version")

if (nextVersion < this) {
gradleVersionError(
"Next version ($nextVersion) should be higher than the current one ($this)"
)
"Next version ($nextVersion) should be higher than the current one ($this)")
}
return nextVersion
}
Expand Down Expand Up @@ -378,16 +366,7 @@ private constructor(
checkMode: CheckMode = Insignificant,
): Result<GradleVersion> = runCatching {
GradleVersion(
major,
minor,
patch,
stageName,
stageNum,
commits,
hash,
metadata,
checkMode
)
major, minor, patch, stageName, stageNum, commits, hash, metadata, checkMode)
}

public fun getOrNull(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ internal class GradleVersionTest {
Arb.constant("rc"),
Arb.constant("SNAPSHOT"),
Arb.constant("zasca"),
Arb.constant(null)
)
Arb.constant(null))
private val num =
Arb.choice(
Arb.positiveInt(11),
Expand All @@ -62,8 +61,7 @@ internal class GradleVersionTest {
Arb.constant("4Hash3h"),
Arb.constant("0h2az2U"),
Arb.constant("102aY20"),
Arb.constant(null)
)
Arb.constant(null))

private val metadata =
Arb.choice(
Expand All @@ -77,8 +75,7 @@ internal class GradleVersionTest {
Arb.constant("777777777"),
Arb.constant("AAAA"),
Arb.constant("BBBBBBBBB"),
Arb.constant(null)
)
Arb.constant(null))

private val versionArbitrary: Arb<Version> = arbitrary {
val major: Int = major.bind()
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
hubdle = "0.7.0"
hubdle = "0.7.1"

[plugins]
javiersc-hubdle = { id = "com.javiersc.hubdle", version.ref = "hubdle" }
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ private constructor(
message = headRevCommit.shortMessage,
fullMessage = headRevCommit.fullMessage,
hash = headRevCommit.toObjectId().name,
)
)
))
}

internal val commitsInCurrentBranchRevCommit: List<RevCommit> by lazy {
Expand Down Expand Up @@ -130,8 +129,7 @@ private constructor(
message = commit.shortMessage,
fullMessage = commit.fullMessage,
hash = commit.toObjectId().name,
)
)
))
}

internal fun tagsInCurrentCommit(hash: String): List<GitRef.Tag> =
Expand Down Expand Up @@ -185,9 +183,9 @@ private constructor(
val higherVersion: GradleVersion? =
versionsInCurrentBranch(tagPrefix).firstOrNull()

if (
lastVersion != null && higherVersion != null && higherVersion > lastVersion
) {
if (lastVersion != null &&
higherVersion != null &&
higherVersion > lastVersion) {
isWarningLastVersionIsNotHigherVersion(true)
warningLastVersionIsNotHigherVersion(lastVersion, higherVersion)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ internal val Git.headCommit: GitRef.Head
message = headRevCommit.shortMessage,
fullMessage = headRevCommit.fullMessage,
hash = headRevCommit.toObjectId().name,
)
)
))

internal val Git.headRevCommit: RevCommit
get() = RevWalk(repository).parseCommit(repository.resolve(Constants.HEAD))
Expand Down Expand Up @@ -98,8 +97,7 @@ internal val Git.tagsInRepo: List<GitRef.Tag>
message = commit.shortMessage,
fullMessage = commit.fullMessage,
hash = commit.toObjectId().name,
)
)
))
}

internal val Git.tagsInRepoRef: List<Ref>
Expand All @@ -123,8 +121,7 @@ internal val Git.tagsInCurrentBranch: List<GitRef.Tag>
message = commit.shortMessage,
fullMessage = commit.fullMessage,
hash = commit.toObjectId().name,
)
)
))
}

internal val Git.tagsInCurrentBranchRef: List<Ref>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,16 @@ constructor(

internal fun register(project: Project): Provider<GitBuildService> =
project.gradle.sharedServices.registerIfAbsent(
"gitTagBuildService",
GitBuildService::class
) { buildService ->
val commitsMaxCount: Int =
project.commitsMaxCount.orNull ?: project.semverExtension.commitsMaxCount.get()
buildService.parameters.gitDir.set(project.semverExtension.gitDir)
buildService.parameters.commitsMaxCount.set(commitsMaxCount)
buildService.parameters.remoteProperty.set(project.remoteProperty)

buildService.maxParallelUsages.set(1)
}
"gitTagBuildService", GitBuildService::class) { buildService ->
val commitsMaxCount: Int =
project.commitsMaxCount.orNull
?: project.semverExtension.commitsMaxCount.get()
buildService.parameters.gitDir.set(project.semverExtension.gitDir)
buildService.parameters.commitsMaxCount.set(commitsMaxCount)
buildService.parameters.remoteProperty.set(project.remoteProperty)

buildService.maxParallelUsages.set(1)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,56 +40,50 @@ constructor(
@Input
@Option(
option = "githubOnlyRoot",
description = "Set any GitHub option to work only on the root project `printSemver` task"
)
description = "Set any GitHub option to work only on the root project `printSemver` task")
public val githubOnlyRoot: Property<Boolean> = objects.property<Boolean>().convention(false)

@Input
@Option(
option = "githubEnvTag",
description =
"Set the version as `semver-tag-subproject-name` environment variable of the GitHub Actions"
)
"Set the version as `semver-tag-subproject-name` environment variable of the GitHub Actions")
public val githubEnvTag: Property<Boolean> = objects.property<Boolean>().convention(false)

@Input
@Option(
option = "githubEnvVersion",
description =
"Set the version as `semver-version-subproject-name` environment variable of the GitHub Actions"
)
"Set the version as `semver-version-subproject-name` environment variable of the GitHub Actions")
public val githubEnvVersion: Property<Boolean> = objects.property<Boolean>().convention(false)

@Input
@Option(
option = "githubEnv",
description =
"Set the version as `semver-subproject-name` environment variable of the GitHub Actions"
)
"Set the version as `semver-subproject-name` environment variable of the GitHub Actions")
public val githubEnv: Property<Boolean> = objects.property<Boolean>().convention(false)

@Input
@Option(
option = "githubOutputTag",
description = "Set the version as `semver-tag-subproject-name` output of the GitHub Actions"
)
description =
"Set the version as `semver-tag-subproject-name` output of the GitHub Actions")
public val githubOutputTag: Property<Boolean> = objects.property<Boolean>().convention(false)

@Input
@Option(
option = "githubOutputVersion",
description =
"Set the version as `semver-version-subproject-name` output of the GitHub Actions"
)
"Set the version as `semver-version-subproject-name` output of the GitHub Actions")
public val githubOutputVersion: Property<Boolean> =
objects.property<Boolean>().convention(false)

@Input
@Option(
option = "githubOutput",
description =
"Set the version as `semver-subproject-name` output of the GitHub Actions `semver` step ID"
)
"Set the version as `semver-subproject-name` output of the GitHub Actions `semver` step ID")
public val githubOutput: Property<Boolean> = objects.property<Boolean>().convention(false)

@get:Input public abstract val tagPrefix: Property<String>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ constructor(
|$semverWithPrefix
|
"""
.trimMargin()
)
.trimMargin())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ internal class CalculatedVersionTest {
commits = 0,
hash = git.lastCommitInCurrentBranch!!.hash.take(7),
metadata = null,
)
)
))

resolve("2 commit.txt").createNewFile()

Expand All @@ -33,8 +32,7 @@ internal class CalculatedVersionTest {
commits = 0,
hash = git.lastCommitInCurrentBranch!!.hash.take(7),
metadata = "DIRTY",
)
)
))

git.add().addFilepattern(".").call()
git.commit().setMessage("2 commit").call()
Expand All @@ -50,8 +48,7 @@ internal class CalculatedVersionTest {
commits = 0,
hash = null,
metadata = "DIRTY",
)
)
))

git.add().addFilepattern(".").call()

Expand All @@ -61,8 +58,7 @@ internal class CalculatedVersionTest {
commits = 0,
hash = null,
metadata = "DIRTY",
)
)
))

git.commit().setMessage("3 commit").call()

Expand All @@ -72,8 +68,7 @@ internal class CalculatedVersionTest {
commits = 1,
hash = git.lastCommitInCurrentBranch!!.hash.take(7),
metadata = null,
)
)
))
}
}

Expand Down
Loading

0 comments on commit b0c1ff2

Please sign in to comment.