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

fix: Linux support for localnet script #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

zotho
Copy link

@zotho zotho commented May 13, 2024

On Linux:

make localnet-build
...
./localnet/build-docker.sh: line 17: docker-compose: command not found

# Version I'm running:
docker compose version
Docker Compose version v2.26.1
make localnet-init
# Got a lot errors in the output...
sed: can't read s/\(persistent_peers *= *"\).*\(" *\)/\1 [email protected]:26656,[email protected]:26656\2/: No such file or directory
sed: can't read s/moniker = "localtestnet"/moniker = "validator03"/g: No such file or directory

I've add check for $OSTYPE variable and replaced docker-compose -> docker compose.

@zotho zotho requested review from yakud and HarmlessEvil May 13, 2024 10:56
@zotho zotho self-assigned this May 13, 2024
@HarmlessEvil
Copy link
Collaborator

I don't really like that we copy-pasted exactly the same commands twice. We can store the command in variable like this:

# Check if we are on macOS
if [[ "$OSTYPE" == "darwin"* ]]; then
    SED_COMMAND="sed -i ''"
else
    SED_COMMAND="sed -i"
fi

And then use it like this:

$SED_COMMAND '/\[api\]/,+3 s/enable = false/enable = true/' $MAIN_PATH_CONFIG/app.toml

@jilio
Copy link
Collaborator

jilio commented Dec 5, 2024

Hey @valli0x
Same here. Please review this PR. If it's still useful, please resolve conflicts and rebase it. If not, let's close it.

@jilio jilio requested a review from valli0x December 5, 2024 15:01
@jilio jilio changed the title Fix scripts for Linux fix: Linux support for localnet script Dec 5, 2024
@HarmlessEvil HarmlessEvil removed their request for review December 5, 2024 16:04
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.

4 participants