Skip to content

Commit

Permalink
ci: fix chaosnet build (#1806)
Browse files Browse the repository at this point in the history
* ci: fix chaosnet build

* fix(scripts): use better current absolute path directory fn

* refactor(e2e-localnet): remove unused script

* fix(justfile): handle case where stop is called without anything running

---------

Co-authored-by: Unique-Divine <[email protected]>
  • Loading branch information
k-yang and Unique-Divine committed Feb 24, 2024
1 parent 16dbe32 commit 32aa8b7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 249 deletions.
1 change: 1 addition & 0 deletions contrib/docker/chaosnet.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN apk --no-cache add \
COPY --from=builder /nibiru/build/nibid /usr/local/bin/nibid

COPY ./contrib/scripts/chaosnet.sh ./
COPY ./contrib/scripts/feat-perp.sh ./
RUN chmod +x ./chaosnet.sh
ARG MNEMONIC
ARG CHAIN_ID
Expand Down
2 changes: 1 addition & 1 deletion contrib/scripts/chaosnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ add_genesis_param() {
mv $HOME/.nibid/config/tmp_genesis.json $HOME/.nibid/config/genesis.json
}

curr_dir="$(dirname "$0")"
curr_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source "$curr_dir/feat-perp.sh"
add_genesis_perp_markets_offline

Expand Down
244 changes: 0 additions & 244 deletions contrib/scripts/e2e/localnet.sh

This file was deleted.

5 changes: 1 addition & 4 deletions contrib/scripts/localnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ build_from_source() {
fi
}

# Initialize an associative array for feature flags with default values
declare -A features=( ["perp"]=0 ["spot"]=0 )

# enable_feature_flag: Enables feature flags variables if present
enable_feature_flag() {
case $1 in
Expand Down Expand Up @@ -250,7 +247,7 @@ add_genesis_param() {
echo_info "Configuring genesis params"

if $FLAG_PERP; then
local curr_dir="$(dirname "$0")"
curr_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source "$curr_dir/feat-perp.sh"

if add_genesis_perp_markets_with_coingecko_prices; then
Expand Down
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ test-chaosnet:
which_ok nibid
bash contrib/scripts/chaosnet.sh
# Stops any `nibid` processes, even if they're running in the background.
stop:
kill $(pgrep -x nibid) || true

# Runs golang formatter (gofumpt)
fmt:
gofumpt -w x app
Expand Down

0 comments on commit 32aa8b7

Please sign in to comment.