Skip to content

Commit 61f994b

Browse files
committed
Redirect error messages to stderr
1 parent 1b6e65a commit 61f994b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

update-version.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ TO_VERSION=$2
1010

1111
# Validate arguments
1212
if [ -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
1717
fi
1818

1919
# Check if TO_VERSION looks like a flag
2020
if [[ "$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
2525
fi
2626

2727
DRY_RUN=false
2828
if [ "${3:-}" = "--dry-run" ]; then
2929
DRY_RUN=true
3030
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]"
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
3434
fi
3535

3636
# Verify we're in the right directory
3737
if [ ! -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
4040
fi
4141

0 commit comments

Comments
 (0)