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

Refactor core, ecdsa, tbtc and tbtc-dapp Installation Into Their Own Script #60

Merged
merged 4 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
15 changes: 15 additions & 0 deletions install-applications-with-contracts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -e

# Install KEEP-CORE.
./install-keep-core.sh

# Install KEEP-ECDSA.
./install-keep-ecdsa.sh

# Install tBTC.
./install-tbtc.sh

# Install tBTC dApp.
./install-tbtc-dapp.sh
15 changes: 3 additions & 12 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,8 @@ set -e
# Install submodules.
./install-repositories.sh

# Install KEEP-CORE.
./install-keep-core.sh

# Install KEEP-ECDSA.
./install-keep-ecdsa.sh

# Install tBTC.
./install-tbtc.sh

# Install tBTC dApp.
./install-tbtc-dapp.sh
# Install applications and their contracts
./install-applications-with-contracts.sh

# Do not install keep dashboard dApp for e2e nightly test
if [[ $E2E_TEST != true ]]
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about moving this 'if' statement along with ./install-keep-dashboard.sh to install-applications-with-contracts.sh as well? This way, Keep Dashboard dApp installation script will be in the same place as tBTC dApp. One can pass env var E2E_TEST=true ./install.sh when working only in tBTC world and doesn't need Keep Dashboard.

Also, I'm wondering if it makes sense to rename $E2E_TEST -> $INCLUDE_KEEP_DASHBOARD, ie:

# Install keep dashboard dApp when it is needed. In most cases we do not need
# Keep Dashboard when working on e2e tests or working on tBTC.
if [[ $INCLUDE_KEEP_DASHBOARD == true ]]
then
    # Install Keep Dashboard.
    ./install-keep-dashboard.sh
fi

Copy link
Author

Choose a reason for hiding this comment

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

What do you think about moving this 'if' statement along with ./install-keep-dashboard.sh to install-applications-with-contracts.sh as well?

💯

I'm wondering if it makes sense to rename $E2E_TEST -> $INCLUDE_KEEP_DASHBOARD

My only hesitation there would be the case where $E2E_TEST is being used in our testing scripts or build tool scripts or something

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you're right! We have one reference in here and I think this is all. I've introduced E2E_TEST here. Most likely that's the only change, cause I just wanted to speed up the local-setup setup.

Copy link
Author

Choose a reason for hiding this comment

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

Gotcha - In that case I think it would be better if we scoped this PR to just the script changes and leave refactoring $E2E_TEST for another PR. That okay with you?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, changes around scripts look good to me!

Copy link
Contributor

Choose a reason for hiding this comment

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

Created issue to rename $E2E_TEST #63

Expand All @@ -24,4 +15,4 @@ then
./install-keep-dashboard.sh
fi

echo "Installation script executed successfully with versions of submodules:\n$(git submodule)"
echo "Installation script executed successfully with versions of submodules:\n$(git submodule)"