mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
refactor: migrate build system from Taskfile to Makefile
This commit is contained in:
parent
50217d169d
commit
b9b868d55a
33
Makefile
33
Makefile
@ -289,18 +289,45 @@ sh-testnet: mod-tidy
|
||||
.PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet
|
||||
|
||||
###############################################################################
|
||||
### extras ###
|
||||
### generation ###
|
||||
###############################################################################
|
||||
.PHONY: buf-deploy pkl-gen tailwind-gen templ-gen
|
||||
|
||||
.PHONY: buf-publish templ-gen
|
||||
buf-deploy:
|
||||
cd ./proto && bunx buf dep update && bunx buf build && bunx buf push
|
||||
|
||||
pkl-deploy:
|
||||
sh ./scripts/upload_pkl.sh
|
||||
|
||||
pkl-gen:
|
||||
pkl-gen-go pkl/base.types/Ctx.pkl
|
||||
pkl-gen-go pkl/base.types/DWN.pkl
|
||||
pkl-gen-go pkl/base.types/ORM.pkl
|
||||
|
||||
tailwind-gen:
|
||||
cd ./pkg/webapp && bun install && bun run build
|
||||
cp ./pkg/webapp/components/styles/styles.css ./cmd/hway/styles.css
|
||||
rm -rf ./pkg/webapp/node_modules
|
||||
|
||||
templ-gen:
|
||||
templ generate
|
||||
|
||||
buf-publish:
|
||||
|
||||
###############################################################################
|
||||
### custom builds ###
|
||||
###############################################################################
|
||||
.PHONY: motr-build hway-build hway-serve
|
||||
|
||||
buf-deploy:
|
||||
cd ./proto && bunx buf dep update && bunx buf build && bunx buf push
|
||||
|
||||
|
||||
motr-build:
|
||||
GOOS=js GOARCH=wasm go build -o build/app.wasm ./cmd/motr/main.go
|
||||
|
||||
hway-build: tailwind-gen templ-gen
|
||||
go build -o build/hway ./cmd/hway/main.go
|
||||
|
||||
|
||||
###############################################################################
|
||||
### help ###
|
||||
|
86
Taskfile.yml
86
Taskfile.yml
@ -1,86 +0,0 @@
|
||||
version: "3"
|
||||
vars:
|
||||
ROOT_DIR:
|
||||
sh: git rev-parse --show-toplevel
|
||||
|
||||
tasks:
|
||||
clean:
|
||||
internal: true
|
||||
cmds:
|
||||
- rm -rf .task
|
||||
- rm -rf pkg/design/node_modules
|
||||
- rm -rf .out
|
||||
|
||||
# ╭──────────────────────────────────────────────────╮
|
||||
# │ Generate Commands │
|
||||
# ╰──────────────────────────────────────────────────╯
|
||||
|
||||
gen:tailwind:
|
||||
cmds:
|
||||
- cd ./pkg/webapp && bun run build
|
||||
- cp ./pkg/webapp/components/styles/styles.css ./cmd/hway/styles.css
|
||||
|
||||
gen:pkl:
|
||||
sources:
|
||||
- pkl/base.types/Ctx.pkl
|
||||
- pkl/base.types/DWN.pkl
|
||||
- pkl/base.types/ORM.pkl
|
||||
cmds:
|
||||
- for: sources
|
||||
cmd: go run github.com/apple/pkl-go/cmd/pkl-gen-go {{ .ITEM }}
|
||||
- task: clean
|
||||
|
||||
gen:templ:
|
||||
cmds:
|
||||
- templ generate
|
||||
|
||||
# ╭──────────────────────────────────────────────────╮
|
||||
# │ Build Commands │
|
||||
# ╰──────────────────────────────────────────────────╯
|
||||
build:motr:
|
||||
env:
|
||||
GOOS: js
|
||||
GOARCH: wasm
|
||||
cmds:
|
||||
- go build -o build/app.wasm ./cmd/motr/main.go
|
||||
|
||||
build:hway:
|
||||
cmds:
|
||||
- task: gen:tailwind
|
||||
- task: gen:templ
|
||||
- go build -o build/hway ./cmd/hway/main.go
|
||||
|
||||
# ╭──────────────────────────────────────────────────╮
|
||||
# │ Serve Commands │
|
||||
# ╰──────────────────────────────────────────────────╯
|
||||
|
||||
serve:hway:
|
||||
cmds:
|
||||
- task: build:hway
|
||||
- ./build/hway
|
||||
|
||||
# ╭──────────────────────────────────────────────────╮
|
||||
# │ Deploy Commands │
|
||||
# ╰──────────────────────────────────────────────────╯
|
||||
deploy:buf:
|
||||
dir: proto
|
||||
cmds:
|
||||
- bunx buf dep update
|
||||
- bunx buf build
|
||||
- bunx buf push
|
||||
|
||||
deploy:hway:
|
||||
dir: cmd/hway
|
||||
cmds:
|
||||
- task: gen:design
|
||||
- bunx wrangler deploy
|
||||
|
||||
deploy:pkl:
|
||||
cmds:
|
||||
- bunx pkl project package pkl/*/
|
||||
- |
|
||||
for dir in .out/*/; do
|
||||
folder=$(basename "$dir")
|
||||
rclone copy "$dir" "r2:pkljar/$folder"
|
||||
done
|
||||
- task: clean
|
3503
cmd/hway/styles.css
Normal file
3503
cmd/hway/styles.css
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
3503
pkg/webapp/components/styles/styles.css
Normal file
3503
pkg/webapp/components/styles/styles.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,7 @@ message GenesisState {
|
||||
// Params defines all the parameters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Params defines the set of module parameters.
|
||||
message Params {
|
||||
option (amino.name) = "vault/params";
|
||||
@ -22,6 +23,19 @@ message Params {
|
||||
Schema schema = 4;
|
||||
}
|
||||
|
||||
// Capability reprensents the available capabilities of a decentralized web node
|
||||
message Capability {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
}
|
||||
|
||||
// Resource reprensents the available resources of a decentralized web node
|
||||
message Resource {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
}
|
||||
|
||||
// Schema is the Database Model for Decentralized Web Nodes
|
||||
message Schema {
|
||||
int32 version = 1;
|
||||
string account = 2;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
go install github.com/cosmos/gex@latest
|
||||
go install github.com/apple/pkl-go/cmd/pkl-gen-go@latest
|
||||
|
||||
rm -rf ~/.ipfs
|
||||
|
||||
|
14
scripts/upload_pkl.sh
Executable file
14
scripts/upload_pkl.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||
|
||||
bunx pkl project package $ROOT_DIR/pkl/*/
|
||||
|
||||
for dir in .out/*/; do
|
||||
folder=$(basename "$dir")
|
||||
rclone copy "$dir" "r2:pkljar/$folder"
|
||||
done
|
||||
|
||||
rm -rf .out
|
Loading…
x
Reference in New Issue
Block a user