Skip to content

Commit f41891d

Browse files
committed
Gemini feedback
1 parent c954e08 commit f41891d

File tree

5 files changed

+43
-27
lines changed

5 files changed

+43
-27
lines changed

.enforcer-scripts/validate-jbang-versions.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def jbangFile = new File(project.basedir, scriptName)
1111
if (!jbangFile.exists()) {
1212
// If a script name was explicitly provided but doesn't exist, fail.
1313
// If using the fallback, we might want to just skip (return true).
14-
System.err.println("[INFO] JBang validator: File not found: " + jbangFile.absolutePath)
14+
System.err.println("[ERROR] JBang validator: File not found: " + jbangFile.absolutePath)
1515
throw new IllegalStateException("[ERROR] JBang validator: File not found: " + jbangFile.absolutePath)
1616
}
1717

RELEASE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ The following secrets must be configured in GitHub repository settings:
2727

2828
## Release Steps
2929

30+
The examples below use `0.4.0.Alpha1-SNAPSHOT`, `0.4.0.Alpha1` and `0.4.0.Alpha2-SNAPSHOT` for examples. You
31+
should of course substitute these with the relevant versions.
32+
3033
### 1. Prepare Release Version
3134

3235
Use the provided script to update all version numbers:
@@ -46,8 +49,8 @@ The script automatically updates:
4649

4750
**What gets updated**:
4851
```
49-
pom.xml: 0.3.0.Beta1-SNAPSHOT → 0.3.0.Beta1
50-
//DEPS io.github...: 0.3.0.Beta1-SNAPSHOT → 0.3.0.Beta1
52+
pom.xml: 0.4.0.Alpha1-SNAPSHOT → 0.4.0.Alpha1
53+
//DEPS io.github...: 0.4.0.Alpha1-SNAPSHOT → 0.4.0.Alpha1
5154
```
5255

5356
### 2. Verify Changes
@@ -58,11 +61,8 @@ Review the changes before committing:
5861
# Review all changes
5962
git diff
6063

61-
# Verify build with release profile
62-
mvn validate
63-
64-
# Check that JBang validation passes
65-
cd examples/helloworld/client && mvn validate
64+
# Verify build works
65+
mvn clean install
6666
```
6767

6868
### 3. Create Release PR

examples/helloworld/client/pom.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
<plugin>
4747
<groupId>org.codehaus.gmavenplus</groupId>
4848
<artifactId>gmavenplus-plugin</artifactId>
49-
<version>3.0.2</version>
5049
<executions>
5150
<execution>
5251
<id>validate-jbang-versions</id>
@@ -61,14 +60,6 @@
6160
</configuration>
6261
</execution>
6362
</executions>
64-
<dependencies>
65-
<dependency>
66-
<groupId>org.apache.groovy</groupId>
67-
<artifactId>groovy</artifactId>
68-
<version>4.0.15</version>
69-
<scope>runtime</scope>
70-
</dependency>
71-
</dependencies>
7263
</plugin>
7364
</plugins>
7465
</build>

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
4949
<maven-javadoc-plugin.version>3.8.0</maven-javadoc-plugin.version>
5050
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
51+
<gmavenplus-plugin.version>4.2.1</gmavenplus-plugin.version>
5152
<sonatype-central-publishing-plugin.version>0.8.0</sonatype-central-publishing-plugin.version>
53+
<groovy.version>5.0.3</groovy.version>
5254
<gson.version>2.13.2</gson.version>
5355
<jakarta.enterprise.cdi-api.version>4.1.0</jakarta.enterprise.cdi-api.version>
5456
<jakarta.inject.jakarta.inject-api.version>2.0.1</jakarta.inject.jakarta.inject-api.version>
@@ -389,6 +391,25 @@
389391
</systemPropertyVariables>
390392
</configuration>
391393
</plugin>
394+
<plugin>
395+
<groupId>org.codehaus.gmavenplus</groupId>
396+
<artifactId>gmavenplus-plugin</artifactId>
397+
<version>${gmavenplus-plugin.version}</version>
398+
<dependencies>
399+
<dependency>
400+
<groupId>org.apache.groovy</groupId>
401+
<artifactId>groovy</artifactId>
402+
<version>${groovy.version}</version>
403+
<scope>runtime</scope>
404+
</dependency>
405+
<dependency>
406+
<groupId>org.apache.groovy</groupId>
407+
<artifactId>groovy-ant</artifactId>
408+
<version>${groovy.version}</version>
409+
<scope>runtime</scope>
410+
</dependency>
411+
</dependencies>
412+
</plugin>
392413
<plugin>
393414
<groupId>org.apache.maven.plugins</groupId>
394415
<artifactId>maven-jar-plugin</artifactId>

update-version.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,32 @@ set -e # Exit on error
77

88
FROM_VERSION=$1
99
TO_VERSION=$2
10-
DRY_RUN=false
11-
12-
# Check for dry-run flag
13-
if [ "$3" = "--dry-run" ] || [ "$2" = "--dry-run" ]; then
14-
DRY_RUN=true
15-
fi
1610

1711
# Validate arguments
18-
if [ -z "$FROM_VERSION" ]; then
19-
echo "❌ Error: No from version specified"
12+
if [ -z "$FROM_VERSION" ] || [ -z "$TO_VERSION" ]; then
13+
echo "❌ Error: Missing version arguments."
2014
echo "Usage: $0 FROM_VERSION TO_VERSION [--dry-run]"
2115
echo "Example: $0 0.3.0.Beta1-SNAPSHOT 0.3.0.Beta1"
2216
exit 1
2317
fi
2418

25-
if [ -z "$TO_VERSION" ] && [ "$FROM_VERSION" != "--dry-run" ]; then
26-
echo "❌ Error: No to version specified"
19+
# Check if TO_VERSION looks like a flag
20+
if [[ "$TO_VERSION" == --* ]]; then
21+
echo "❌ Error: TO_VERSION cannot be a flag. Did you mean to provide both FROM_VERSION and TO_VERSION?"
2722
echo "Usage: $0 FROM_VERSION TO_VERSION [--dry-run]"
2823
echo "Example: $0 0.3.0.Beta1-SNAPSHOT 0.3.0.Beta1"
2924
exit 1
3025
fi
3126

27+
DRY_RUN=false
28+
if [ "$3" = "--dry-run" ]; then
29+
DRY_RUN=true
30+
elif [ -n "$3" ]; then
31+
echo "❌ Error: Invalid third argument. Only '--dry-run' is supported."
32+
echo "Usage: $0 FROM_VERSION TO_VERSION [--dry-run]"
33+
exit 1
34+
fi
35+
3236
# Verify we're in the right directory
3337
if [ ! -f "pom.xml" ]; then
3438
echo "❌ Error: pom.xml not found. Run this script from the a2a-java root directory."

0 commit comments

Comments
 (0)