@@ -10,32 +10,32 @@ TO_VERSION=$2
1010
1111# Validate arguments
1212if [ -z " $FROM_VERSION " ] || [ -z " $TO_VERSION " ]; then
13- echo " ❌ Error: Missing version arguments."
14- echo " Usage: $0 FROM_VERSION TO_VERSION [--dry-run]"
15- echo " Example: $0 0.3.0.Beta1-SNAPSHOT 0.3.0.Beta1"
13+ echo " ❌ Error: Missing version arguments." >&2
14+ echo " Usage: $0 FROM_VERSION TO_VERSION [--dry-run]" >&2
15+ echo " Example: $0 0.3.0.Beta1-SNAPSHOT 0.3.0.Beta1" >&2
1616 exit 1
1717fi
1818
1919# Check if TO_VERSION looks like a flag
2020if [[ " $TO_VERSION " == --* ]]; then
21- echo " ❌ Error: TO_VERSION cannot be a flag. Did you mean to provide both FROM_VERSION and TO_VERSION?"
22- echo " Usage: $0 FROM_VERSION TO_VERSION [--dry-run]"
23- echo " Example: $0 0.3.0.Beta1-SNAPSHOT 0.3.0.Beta1"
21+ echo " ❌ Error: TO_VERSION cannot be a flag. Did you mean to provide both FROM_VERSION and TO_VERSION?" >&2
22+ echo " Usage: $0 FROM_VERSION TO_VERSION [--dry-run]" >&2
23+ echo " Example: $0 0.3.0.Beta1-SNAPSHOT 0.3.0.Beta1" >&2
2424 exit 1
2525fi
2626
2727DRY_RUN=false
2828if [ " ${3:- } " = " --dry-run" ]; then
2929 DRY_RUN=true
3030elif [ -n " ${3:- } " ]; then
31- echo " ❌ Error: Invalid third argument. Only '--dry-run' is supported."
32- echo " Usage: $0 FROM_VERSION TO_VERSION [--dry-run]"
31+ echo " ❌ Error: Invalid third argument. Only '--dry-run' is supported." >&2
32+ echo " Usage: $0 FROM_VERSION TO_VERSION [--dry-run]" >&2
3333 exit 1
3434fi
3535
3636# Verify we're in the right directory
3737if [ ! -f " pom.xml" ]; then
38- echo " ❌ Error: pom.xml not found. Run this script from the a2a-java root directory."
38+ echo " ❌ Error: pom.xml not found. Run this script from the a2a-java root directory." >&2
3939 exit 1
4040fi
4141
0 commit comments