Skip to content
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

Created check_requirements.sh #3028 #3054

Merged
merged 1 commit into from
Apr 26, 2021
Merged

Conversation

nclsbayona
Copy link
Contributor

What

Contributing what is asked for in #3028 .

How

To achieve a solution, a bash script was created in the directory ./tools/bin with the name check_requirements.sh

Pre-merge Checklist

Don't think there were any pre-requisites, since its new and it's not referenced by any other component.

Recommended reading order

  1. ./tools/bin/check_requirements.sh

Comment on lines +1 to +6
printf "Docker ";
if [[ $(which docker) && $(docker --version) ]]; then
printf "is installed"
else
printf "needs to be installed"
fi;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of leaving these at github comments, you can add them as comments in the actual script. i think it's worth it because it will help the next person who reads it!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually. i take it back. since you're printing it, it's pretty clear what does what.

Comment on lines +8 to +24
desired="14"
printf "Java ";
if [[ "$(which java)" && "$(java --version)" ]];
then
printf "installed"
str="$(java --version)"
IFS=' ' read -ra array <<< "${str}"
version="${array[1]}"
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]];
then
printf " and functional"
else
printf " but not functional, must have version ${desired} at least"
fi
else
printf "not installed, must have version ${desired} at least"
fi;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java

Comment on lines +62 to +67
printf "JQ ";
if [[ $(which jq) && $(jq --version) ]]; then
printf "is installed"
else
printf "needs to be installed"
fi;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JQ

Comment on lines +26 to +42
desired="20.1"
printf "Pip ";
if [[ "$(which pip)" && "$(pip --version)" ]];
then
printf "installed"
str="$(pip --version)"
IFS=' ' read -ra array <<< "${str}"
version="${array[1]}"
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]];
then
printf " and functional"
else
printf " but not functional, must have version ${desired} at least"
fi
else
printf "not installed, must have version ${desired} at least"
fi;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PIP

Comment on lines +44 to +60
desired="3.7.9"
printf "Python ";
if [[ "$(which python3)" && "$(python3 --version)" ]];
then
printf "installed"
str="$(python3 --version)"
IFS=' ' read -ra array <<< "${str}"
version="${array[1]}"
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]];
then
printf " and functional"
else
printf " but not functional, must have version ${desired} at least"
fi
else
printf "not installed, must have version ${desired} at least"
fi;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PYTHON

Copy link
Contributor

@cgardens cgardens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks great, @nclsbayona ! thanks for contributing this. i left 1 very minor comment. once you address them, i'd be happy to merge this!

Comment on lines +1 to +6
printf "Docker ";
if [[ $(which docker) && $(docker --version) ]]; then
printf "is installed"
else
printf "needs to be installed"
fi;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of leaving these at github comments, you can add them as comments in the actual script. i think it's worth it because it will help the next person who reads it!

@cgardens cgardens merged commit 636a21e into airbytehq:master Apr 26, 2021
@cgardens
Copy link
Contributor

Actually I think this is ready to go as it is! Merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants