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

feat: install script compiles all dependencies locally #211

Conversation

mtsitrin
Copy link
Contributor

@mtsitrin mtsitrin commented Jul 6, 2023

PR Standards

Opening a pull request should be able to meet the following requirements


For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@mtsitrin mtsitrin requested a review from a team as a code owner July 6, 2023 14:58
@mtsitrin mtsitrin linked an issue Jul 6, 2023 that may be closed by this pull request
Copy link
Collaborator

@yishay-dym yishay-dym left a comment

Choose a reason for hiding this comment

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

looks good

Copy link
Contributor

@ItayLevyOfficial ItayLevyOfficial left a comment

Choose a reason for hiding this comment

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

I think if we decide to move to this approach - the installation script should always behave this way, and not try to install the old way first

GO_REQUIRED_VERSION="1.19"
display_go_installation_instructions() {
echo "$EMOJI To install Go $GO_REQUIRED_VERSION, you can run the following commands:"
echo " wget https://go.dev/dl/go1.19.10.${OS}-${ARCH}.tar.gz"
Copy link
Contributor

Choose a reason for hiding this comment

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

@shaolin-flow add wget as a requirement for the docs

IFS=' ' read -r -a binary_array <<< "${BINARYNAME[i]}" # convert string to array
binary=${binary_array[0]} # get the first element
echo "$EMOJI checking for $binary..."
if [ -x "$(command -v "$binary")" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for that - if the binary not exist in the roller path, we want to install it. this will cause versioning problems

Copy link
Contributor

Choose a reason for hiding this comment

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

Or verify the binary version as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but if the binary does exist, I'm want to let the user know it's gonna be overridden

fi

for binary in ${BINARYNAME[i]}; do
binary_path=$(which "$binary" 2> /dev/null) # Redirect error output to /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

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

problematic again. the user may have both the standard and the dymension relayer on the same machine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in this case the user had the option to use the existing one or overwrite

install.sh Outdated
sudo mv "/tmp/roller_tmp/roller_bins/lib"/* "$INTERNAL_DIR"
sudo mv "/tmp/roller_tmp/roller_bins/roller" "$ROLLER_BIN_PATH"
sudo mv "/tmp/roller_tmp/roller_bins/rollapp_evm" "$ROLLAPP_EVM_PATH" # move the rollapp_evm binary
if ! sudo curl -L "$TGZ_URL" --progress-bar | sudo tar -xz -C "/tmp/roller_tmp"; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider removing the negation operator (!) from the condition check and flipping the logic inside the if block.

Copy link
Contributor

@ItayLevyOfficial ItayLevyOfficial left a comment

Choose a reason for hiding this comment

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

LGTM

@mtsitrin mtsitrin merged commit c1c4803 into main Jul 9, 2023
@mtsitrin mtsitrin deleted the mtsitrin/207-install-script-should-attempt-to-build-locally-if-release-not-found branch July 9, 2023 12:12
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.

Install script should attempt to build locally if release not found
3 participants