Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
fix(script): fix scripts in docker (#1213)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
### Summary by CodeRabbit

- Refactor: Updated the initialization script in
`e2e/testapp/docker/seed/scripts/seed0-init-step2.sh` to directly use
`/.polard` as the home directory path, enhancing the script's simplicity
and readability.
- Chore: Added a license header to
`e2e/testapp/docker/seed/scripts/set-moniker.sh` for legal compliance.
- Bug Fix: Modified the `sed` command in `set-moniker.sh` to correctly
replace the `moniker` value in the configuration file, improving the
script's functionality and reliability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
BrickBera authored Oct 10, 2023
1 parent 14bbbbd commit a5ed999
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
2 changes: 0 additions & 2 deletions e2e/testapp/docker/seed/scripts/seed0-init-step2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ if [ -z "$KEYALGO" ]; then
KEYALGO="secp256k1"
fi

HOMEDIR="/.polard"

polard genesis collect-gentxs --home "$HOMEDIR"

polard genesis validate-genesis --home "$HOMEDIR"
Expand Down
27 changes: 27 additions & 0 deletions e2e/testapp/docker/seed/scripts/set-moniker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SPDX-License-Identifier: BUSL-1.1
#
# Copyright (C) 2023, Berachain Foundation. All rights reserved.
# Use of this software is govered by the Business Source License included
# in the LICENSE file of this repository and at www.mariadb.com/bsl11.
#
# ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY
# TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER
# VERSIONS OF THE LICENSED WORK.
#
# THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF
# LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF
# LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE).
#
# TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
# AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
# EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
# TITLE.

if [ -z "$HOMEDIR" ]; then
HOMEDIR="/.polard"
fi
CONFIG_TOML=$HOMEDIR/config/config.toml

MONIKER=$1
sed -i "s/^moniker = .*/moniker = \"$MONIKER\"/" "$CONFIG_TOML"

0 comments on commit a5ed999

Please sign in to comment.