Skip to content

Commit 5a8aac4

Browse files
fix(ci): use simple release-type with extra-files for Gradle project (#145)
Switch Release Please configuration to use the 'simple' release type with 'extra-files' instead of 'version-file' approach. This is the recommended configuration for Gradle projects since Release Please doesn't have native Gradle support. Changes: - Use 'extra-files' to update gradle.properties instead of version-file - Add version marker (# x-release-please-version) to gradle.properties - Remove version-file and version-file-prefix configuration This fixes the "Empty change set" error by avoiding snapshot bumps that the 'java' release type was attempting. The 'simple' release type will now correctly create release PRs (0.41.0 → 0.42.0) based on conventional commits without trying to create intermediate snapshot versions. Tested locally and confirmed it creates proper release PRs with changelog and version updates. Test locally with: ``` release-please release-pr --repo-url=forcedotcom/datacloud-jdbc \ --config-file=release-please-config.json \ --manifest-file=.release-please-manifest.json \ --target-branch=<branch-name> \ --token=\"\$GITHUB_TOKEN\" \ --dry-run" ```
1 parent 8518b23 commit 5a8aac4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ hyperApiVersion=0.0.23576.r0633e4a4
88

99
# Revision here is what is used when producing local and snapshot builds,
1010
# it is ignored for releases which instead use the tag
11-
revision=0.41.0
11+
revision=0.41.0 # x-release-please-version

release-please-config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"packages": {
33
".": {
4-
"release-type": "java",
5-
"version-file": "gradle.properties",
6-
"version-file-prefix": "revision=",
4+
"release-type": "simple",
75
"changelog-path": "CHANGELOG.md",
8-
"extra-files": []
6+
"extra-files": [
7+
"gradle.properties"
8+
]
99
}
1010
},
1111
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"

0 commit comments

Comments
 (0)