Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tools/android_sdk/create_cipd_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ print_usage () {
echo "Usage:"
echo " ./create_cipd_packages.sh <VERSION_TAG> [PATH_TO_SDK_DIR]"
echo " Downloads, packages, and uploads Android SDK packages where:"
echo " - VERSION_TAG is the tag of the cipd packages, e.g. 28r6 or 31v1"
echo " - VERSION_TAG is the tag of the cipd packages, e.g. 28r6 or 31v1. Must contain"
echo " only lowercase letters and numbers."
echo " - PATH_TO_SDK_DIR is the path to the sdk folder. If omitted, this defaults to"
echo " your ANDROID_SDK_ROOT environment variable."
echo " ./create_cipd_packages.sh list"
Expand All @@ -31,6 +32,13 @@ if [[ $1 == "" ]]; then
exit 1
fi

#Validate version contains only lower case letters and numbers
if ! [[ $1 =~ ^[[:lower:][:digit:]]+$ ]]; then
echo "Version tag can only consist of lower case letters and digits.";
print_usage
exit 1
fi

# Validate path contains depot_tools
if [[ `which cipd` == "" ]]; then
echo "'cipd' command not found. depot_tools should be on the path."
Expand Down