mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
refactor: remove unused devbox.json and related configurations
This commit is contained in:
parent
b57bea6f7b
commit
e139aee2b3
49
Makefile
49
Makefile
@ -8,7 +8,6 @@ SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
|
||||
BINDIR ?= $(GOPATH)/bin
|
||||
SIMAPP = ./app
|
||||
|
||||
PC_NO_SERVER ?= true
|
||||
PC_PORT_NUM ?= 42069
|
||||
PC_LOG_FILE ?= ./sonr.log
|
||||
|
||||
@ -120,18 +119,16 @@ clean:
|
||||
rm -rf .aider*
|
||||
rm -rf static
|
||||
rm -rf .out
|
||||
rm -rf build
|
||||
rm -rf hway.db
|
||||
rm -rf snapcraft-local.yaml build/
|
||||
rm -rf build
|
||||
|
||||
distclean: clean
|
||||
rm -rf vendor/
|
||||
|
||||
get-process-compose:
|
||||
ifeq (,$(shell which process-compose))
|
||||
init-env:
|
||||
@echo "Installing process-compose"
|
||||
sh -c "$(curl --location https://raw.githubusercontent.com/F1bonacc1/process-compose/main/scripts/get-pc.sh)" -- -d -b ~/.local/bin
|
||||
endif
|
||||
sh scripts/init_env.sh
|
||||
|
||||
########################################
|
||||
### Testing
|
||||
@ -309,16 +306,16 @@ sh-testnet: mod-tidy
|
||||
###############################################################################
|
||||
### generation ###
|
||||
###############################################################################
|
||||
.PHONY: pkl-gen tailwind-gen templ-gen
|
||||
.PHONY: gen-pkl gen-templ
|
||||
|
||||
pkl-gen:
|
||||
gen-pkl:
|
||||
go install github.com/apple/pkl-go/cmd/pkl-gen-go@latest
|
||||
pkl-gen-go pkl/sonr.motr/ATN.pkl
|
||||
pkl-gen-go pkl/sonr.hway/Env.pkl
|
||||
pkl-gen-go pkl/sonr.motr/DWN.pkl
|
||||
pkl-gen-go pkl/sonr.hway/ORM.pkl
|
||||
|
||||
templ-gen:
|
||||
gen-templ:
|
||||
@go install github.com/a-h/templ/cmd/templ@latest
|
||||
templ generate
|
||||
|
||||
@ -326,29 +323,41 @@ templ-gen:
|
||||
###############################################################################
|
||||
### custom builds ###
|
||||
###############################################################################
|
||||
.PHONY: motr-build hway-build start
|
||||
.PHONY: build-motr build-hway logs-hway logs-sonr
|
||||
|
||||
motr-build:
|
||||
build-motr:
|
||||
GOOS=js GOARCH=wasm go build -o static/wasm/app.wasm ./cmd/motr/main.go
|
||||
|
||||
hway-build: templ-gen
|
||||
build-hway: templ-gen
|
||||
go build -o build/hway ./cmd/hway/main.go
|
||||
|
||||
start: hway-build
|
||||
$(PROCESS_COMPOSE) up --port $(PC_PORT_NUM) --log-file $(PC_LOG_FILE) --no-server $(PC_NO_SERVER)
|
||||
|
||||
down:
|
||||
$(PROCESS_COMPOSE) down
|
||||
logs-hway: init-env
|
||||
bin/process-compose process logs hway --port $(PC_PORT_NUM) --follow
|
||||
|
||||
logs-sonr: init-env
|
||||
bin/process-compose process logs sonr --port $(PC_PORT_NUM) --follow
|
||||
|
||||
###############################################################################
|
||||
### help ###
|
||||
###############################################################################
|
||||
.PHONY: deploy-buf deploy-pkl
|
||||
|
||||
deploy-buf:
|
||||
.PHONY: deploy start stop restart status
|
||||
|
||||
start: build-hway init-env
|
||||
bin/process-compose up --port $(PC_PORT_NUM) --log-file $(PC_LOG_FILE) --detached
|
||||
|
||||
stop: init-env
|
||||
|
||||
bin/process-compose down --port $(PC_PORT_NUM)
|
||||
|
||||
restart: stop clean start
|
||||
|
||||
status: init-env
|
||||
bin/process-compose project state --port $(PC_PORT_NUM)
|
||||
|
||||
deploy:
|
||||
cd ./proto && bunx buf dep update && bunx buf build && bunx buf push
|
||||
|
||||
deploy-pkl:
|
||||
sh ./.github/scripts/upload_cdn.sh
|
||||
|
||||
|
||||
|
39
devbox.json
39
devbox.json
@ -1,39 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
|
||||
"packages": [
|
||||
"go@latest",
|
||||
"bun@latest",
|
||||
"skate@latest",
|
||||
"templ@latest",
|
||||
"tigerbeetle@latest",
|
||||
"process-compose@latest"
|
||||
],
|
||||
"env": {
|
||||
"ROOT": "$(git rev-parse --show-toplevel)",
|
||||
"GOPATH": "$HOME/go",
|
||||
"GOBIN": "$GOPATH/bin",
|
||||
"CHAIN_ID": "local-1",
|
||||
"DENOM": "stake",
|
||||
"KEYRING": "test",
|
||||
"MONIKER": "florence",
|
||||
"BINARY": "sonrd",
|
||||
"ACC0_NAME": "acc0",
|
||||
"ACC1_NAME": "acc1",
|
||||
"ACC0_ADDRESS": "idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y",
|
||||
"ACC1_ADDRESS": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd",
|
||||
"ACC0_MNEMONIC": "$(skate get ACC0_MNEMONIC)",
|
||||
"ACC1_MNEMONIC": "$(skate get ACC1_MNEMONIC)",
|
||||
"TURNSTILE_SITE_KEY": "$(skate get TURNSTILE_SITE_KEY)",
|
||||
"PC_NO_SERVER": "true",
|
||||
"PC_PORT_NUM": "42069",
|
||||
"PC_LOG_FILE": "./sonr.log"
|
||||
},
|
||||
"shell": {
|
||||
"scripts": {
|
||||
"start": ["process-compose up --hide-disabled"],
|
||||
"up": ["process-compose up --detached --hide-disabled"],
|
||||
"attach": ["process-compose attach"],
|
||||
"down": ["fuser -k 1317/tcp", "fuser -k 3000/tcp"]
|
||||
}
|
||||
}
|
||||
}
|
@ -23,8 +23,6 @@ type Env interface {
|
||||
GetSonrGrpcUrl() string
|
||||
|
||||
GetSonrRpcUrl() string
|
||||
|
||||
GetTurnstileSiteKey() string
|
||||
}
|
||||
|
||||
var _ Env = (*EnvImpl)(nil)
|
||||
@ -45,8 +43,6 @@ type EnvImpl struct {
|
||||
SonrGrpcUrl string `pkl:"sonrGrpcUrl"`
|
||||
|
||||
SonrRpcUrl string `pkl:"sonrRpcUrl"`
|
||||
|
||||
TurnstileSiteKey string `pkl:"turnstileSiteKey"`
|
||||
}
|
||||
|
||||
func (rcv *EnvImpl) GetServePort() int {
|
||||
@ -81,10 +77,6 @@ func (rcv *EnvImpl) GetSonrRpcUrl() string {
|
||||
return rcv.SonrRpcUrl
|
||||
}
|
||||
|
||||
func (rcv *EnvImpl) GetTurnstileSiteKey() string {
|
||||
return rcv.TurnstileSiteKey
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Env
|
||||
func LoadFromPath(ctx context.Context, path string) (ret Env, err error) {
|
||||
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||
|
@ -1,4 +1,4 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/app/gateway/config" }
|
||||
@go.Package { name = "github.com/onsonr/sonr/internal/gateway/config" }
|
||||
|
||||
|
||||
open module sonr.hway.Env
|
||||
@ -14,6 +14,5 @@ ipfsGatewayUrl: String = "http://localhost:8080"
|
||||
sonrApiUrl: String = "http://localhost:1317"
|
||||
sonrGrpcUrl: String = "http://localhost:9090"
|
||||
sonrRpcUrl: String = "http://localhost:26657"
|
||||
turnstileSiteKey: String = read("env:TURNSTILE_SITE_KEY") ?? ""
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/app/vault/types" }
|
||||
@go.Package { name = "github.com/onsonr/sonr/internal/vault/types" }
|
||||
|
||||
module sonr.motr.DWN
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
export KEY="user1"
|
||||
export KEY2="user2"
|
||||
|
||||
export CHAIN_ID=${CHAIN_ID:-"sonr-testnet-1"}
|
||||
export MONIKER="florence"
|
||||
export KEYALGO="secp256k1"
|
||||
export KEYRING=${KEYRING:-"test"}
|
||||
export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.sonr"}")
|
||||
export BINARY=${BINARY:-sonrd}
|
||||
export DENOM=${DENOM:-usnr}
|
||||
|
||||
export CLEAN=${CLEAN:-"true"}
|
||||
export RPC=${RPC:-"26657"}
|
||||
export REST=${REST:-"1317"}
|
||||
export PROFF=${PROFF:-"6969"}
|
||||
export P2P=${P2P:-"26656"}
|
||||
export GRPC=${GRPC:-"9090"}
|
||||
export GRPC_WEB=${GRPC_WEB:-"9091"}
|
||||
export ROSETTA=${ROSETTA:-"8420"}
|
||||
export BLOCK_TIME=${BLOCK_TIME:-"5s"}
|
34
scripts/init_env.sh
Executable file
34
scripts/init_env.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||
export TURNSTILE_SITE_KEY=$(skate get TURNSTILE_SITE_KEY)
|
||||
#
|
||||
# export KEY="user1"
|
||||
# export KEY2="user2"
|
||||
#
|
||||
# export CHAIN_ID=${CHAIN_ID:-"sonr-testnet-1"}
|
||||
# export MONIKER="florence"
|
||||
# export KEYALGO="secp256k1"
|
||||
# export KEYRING=${KEYRING:-"test"}
|
||||
# export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.sonr"}")
|
||||
# export BINARY=${BINARY:-sonrd}
|
||||
# export DENOM=${DENOM:-usnr}
|
||||
#
|
||||
# export CLEAN=${CLEAN:-"true"}
|
||||
# export RPC=${RPC:-"26657"}
|
||||
# export REST=${REST:-"1317"}
|
||||
# export PROFF=${PROFF:-"6969"}
|
||||
# export P2P=${P2P:-"26656"}
|
||||
# export GRPC=${GRPC:-"9090"}
|
||||
# export GRPC_WEB=${GRPC_WEB:-"9091"}
|
||||
# export ROSETTA=${ROSETTA:-"8420"}
|
||||
# export BLOCK_TIME=${BLOCK_TIME:-"5s"}
|
||||
|
||||
# Check if process-compose is installed to $ROOT_DIR/build
|
||||
if [ ! -f "$ROOT_DIR/bin/process-compose" ]; then
|
||||
echo "process-compose not found. Installing..."
|
||||
sh -c "$(curl --location https://raw.githubusercontent.com/F1bonacc1/process-compose/main/scripts/get-pc.sh)" -- -d -b $ROOT_DIR/bin
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user