-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: create script for setting up RBE in local dev environment #16375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Determine the root directory of the Angular github repo. | ||
GITHUB_DIRECTORY_ROOT=$(git rev-parse --show-toplevel 2> /dev/null); | ||
if [[ $? -ne 0 ]]; then | ||
echo "This command must be run from within the angular repository." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "This command must be run from within the angular repository." | |
echo "This command must be run from within the cloned \"angular/components\" repository." |
|
||
# Confirm the parameter provided to the script is a directory | ||
if [[ ! -d $1 ]]; then | ||
echo "The paramter provided is not a directory"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo for parameter
here. How about showing the usage instead? Maybe also expand on why we need to even specify a directory.
echo "The paramter provided is not a directory"; | |
echo "Invalid command syntax. Usage: ./script.sh <ServiceAccountKeyLocation>"; |
echo "The paramter provided is not a directory"; | ||
exit 1; | ||
fi | ||
ABSOLUTE_DIRECTORY_PATH=$(readlink -f $1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: For clarity I think the variable name should be named differently. Absolute directory path only describes the type but not what the variable contains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I can see that, I tried something else. I can't come up with a good name so if you have any ideas let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credentialsDirectory
?
ef69bce
to
def60fb
Compare
# environment to use Remote Build Execution. | ||
|
||
# Determine the root directory of the Angular github repo. | ||
GITHUB_DIRECTORY_ROOT=$(git rev-parse --show-toplevel 2> /dev/null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer lower_case_snake_case
for bash variables
|
||
# Confirm gcloud installed and available as a command. | ||
if [ ! -x "$(command -v gcloud)" ]; then | ||
echo "gcloud command is not available. Please install gcloud before continuing." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this script install gcloud
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't install gcloud
because dependent on your platform we have to install it differently.
9e54d69
to
21c4a9c
Compare
21c4a9c
to
88ed42a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.