mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
chore(scripts): improve new issue script confirmation
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
version: "3"
|
||||
|
||||
vars:
|
||||
GOPATH:
|
||||
sh: go env GOPATH
|
||||
BIN_DIR: "{{.GOPATH}}/bin"
|
||||
BINARY: "{{.BIN_DIR}}/hway"
|
||||
OS:
|
||||
sh: uname -s
|
||||
ARCH:
|
||||
sh: uname -m
|
||||
|
||||
tasks:
|
||||
build:
|
||||
desc: Build the hway binary
|
||||
silent: true
|
||||
cmds:
|
||||
- templ generate
|
||||
- sqlc generate -f internal/database/sqlc.yaml
|
||||
- gum spin --spinner dot --title "Build Hway Single Target ({{.OS}}/{{.ARCH}})..." -- goreleaser build --snapshot --clean --single-target --id hway -o {{.BIN_DIR}}/hway
|
||||
|
||||
install:
|
||||
desc: Install the hway binary
|
||||
silent: true
|
||||
cmds:
|
||||
- templ generate
|
||||
- sqlc generate -f internal/database/sqlc.yaml
|
||||
- gum spin --spinner dot --title "Install Hway Single Target ({{.OS}}/{{.ARCH}})..." -- make install-hway
|
||||
|
||||
start:
|
||||
desc: Start the hway daemon
|
||||
silent: true
|
||||
cmds:
|
||||
- "{{.BINARY}}"
|
||||
@@ -0,0 +1,50 @@
|
||||
version: "3"
|
||||
|
||||
vars:
|
||||
ROOT:
|
||||
sh: git rev-parse --show-toplevel
|
||||
tasks:
|
||||
init:
|
||||
desc: Setup ipfs with Cloudflare
|
||||
silent: true
|
||||
vars:
|
||||
PEERS: |
|
||||
'[
|
||||
{"ID": "QmcFf2FH3CEgTNHeMRGhN7HNHU1EXAxoEk6EFuSyXCsvRE", "Addrs": ["/dnsaddr/node-1.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcFmLd5ySfk2WZuJ1mfSWLDjdmHZq7rSAua4GoeSQfs1z", "Addrs": ["/dnsaddr/node-2.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcfFmzSDVbwexQ9Au2pt5YEXHK5xajwgaU6PpkbLWerMa", "Addrs": ["/dnsaddr/node-3.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcfJeB3Js1FG7T8YaZATEiaHqNKVdQfybYYkbT1knUswx", "Addrs": ["/dnsaddr/node-4.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcfVvzK4tMdFmpJjEKDUoqRgP4W9FnmJoziYX5GXJJ8eZ", "Addrs": ["/dnsaddr/node-5.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcfZD3VKrUxyP9BbyUnZDpbqDnT7cQ4WjPP8TRLXaoE7G", "Addrs": ["/dnsaddr/node-6.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcfZP2LuW4jxviTeG8fi28qjnZScACb8PEgHAc17ZEri3", "Addrs": ["/dnsaddr/node-7.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcfgsJsMtx6qJb74akCw1M24X1zFwgGo11h1cuhwQjtJP", "Addrs": ["/dnsaddr/node-8.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "Qmcfr2FC7pFzJbTSDfYaSy1J8Uuy8ccGLeLyqJCKJvTHMi", "Addrs": ["/dnsaddr/node-9.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcfR3V5YAtHBzxVACWCzXTt26SyEkxdwhGJ6875A8BuWx", "Addrs": ["/dnsaddr/node-10.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "Qmcfuo1TM9uUiJp6dTbm915Rf1aTqm3a3dnmCdDQLHgvL5", "Addrs": ["/dnsaddr/node-11.ingress.cloudflare-ipfs.com"]},
|
||||
{"ID": "QmcfV2sg9zaq7UUHVCGuSvT2M2rnLBAPsiE79vVyK3Cuev", "Addrs": ["/dnsaddr/node-12.ingress.cloudflare-ipfs.com"]}
|
||||
]'
|
||||
cmds:
|
||||
- rm -rf ~/.ipfs
|
||||
- ipfs init
|
||||
- ipfs config --json Peering.Peers {{.PEERS}}
|
||||
- ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
|
||||
|
||||
mount:
|
||||
desc: Mount the ipfs,ipns directories
|
||||
silent: true
|
||||
platforms:
|
||||
- linux
|
||||
cmds:
|
||||
- ipfs config --json Mounts.FuseAllowOther true
|
||||
|
||||
start:
|
||||
desc: Start the ipfs daemon
|
||||
silent: true
|
||||
cmds:
|
||||
- cmd: ipfs daemon --migrate
|
||||
platforms:
|
||||
- darwin
|
||||
- task: mount
|
||||
- cmd: ipfs daemon --mount
|
||||
platforms:
|
||||
- linux
|
||||
@@ -0,0 +1,44 @@
|
||||
version: "3"
|
||||
|
||||
vars:
|
||||
BINARY: sonrd
|
||||
BUILD_FLAGS: -mod=readonly -trimpath
|
||||
BUILD_TAGS: netgo,ledger
|
||||
COMMIT:
|
||||
sh: git rev-parse HEAD
|
||||
VERSION:
|
||||
sh: git describe --tags --always
|
||||
tasks:
|
||||
build:
|
||||
desc: Build the sonrd binary
|
||||
cmds:
|
||||
- >
|
||||
go build
|
||||
{{.BUILD_FLAGS}}
|
||||
-tags "{{.BUILD_TAGS}}"
|
||||
-ldflags "
|
||||
-X github.com/cosmos/cosmos-sdk/version.Name=sonr
|
||||
-X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
|
||||
-X github.com/cosmos/cosmos-sdk/version.Version={{.VERSION}}
|
||||
-X github.com/cosmos/cosmos-sdk/version.Commit={{.COMMIT}}
|
||||
-X github.com/cosmos/cosmos-sdk/version.BuildTags={{.BUILD_TAGS}}
|
||||
"
|
||||
-o ./build/{{.BINARY}}
|
||||
./cmd/sonrd
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
GOARCH:
|
||||
sh: go env GOARCH
|
||||
GOOS:
|
||||
sh: go env GOOS
|
||||
|
||||
install:
|
||||
desc: Install sonrd
|
||||
silent: true
|
||||
cmds:
|
||||
- gum spin --spinner dot --title "Installing sonr daemon..." -- make install
|
||||
|
||||
start:
|
||||
desc: Start the sonr node
|
||||
cmds:
|
||||
- sh scripts/test_dop_node.sh
|
||||
Reference in New Issue
Block a user