Skip to content

Commit 402b5b3

Browse files
authored
Merge pull request #104 from domaframework/fix/plugin-version-configure
Update changelog command and fix tag sorting in build.gradle.kts
2 parents 5092ca3 + 918d5a0 commit 402b5b3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/update_changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Run Gradle updateChangelog
6060
id: updateChangelog
6161
run: |
62-
./gradlew updateChangelog -PreleaseDate=$(date +'%Y-%m-%d')
62+
./gradlew updateChangelog -PreleaseDate=$(date +'%Y-%m-%d') --no-configuration-cache
6363
env:
6464
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6565

build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ tasks.register("updateChangelog") {
278278
.trim()
279279
}
280280

281-
val tagsOutput = runCommand("git tag --sort=-v:creatordate")
281+
val tagsOutput = runCommand("git tag --sort=-creatordate")
282282
val semverRegex = Regex("^\\d+\\.\\d+\\.\\d+$")
283283
val tags = tagsOutput.lines().filter { semverRegex.matches(it) }
284284
if (tags.isEmpty()) {
@@ -419,13 +419,14 @@ tasks.register("updateChangelog") {
419419

420420
// Update Version Gradle pluginVersion
421421
replaceVersionGradleProperty(newVersion)
422+
println("Update Gradle Property: $newVersion")
422423

423424
val githubEnv = System.getenv("GITHUB_ENV")
424425
val envFile = File(githubEnv)
425426
envFile.appendText("NEW_VERSION=$newVersion\n")
426427
envFile.appendText("BRANCH=doc/changelog-update-$newVersion\n")
427428

428-
println("Update CHANGELOG.md :newVersion $newVersion")
429+
println("Update newVersion: $newVersion")
429430
}
430431
}
431432

0 commit comments

Comments
 (0)