generated from alecodes/base-template
chore: add build steps to justfile
This commit is contained in:
parent
ba5199012f
commit
e379967907
2 changed files with 23 additions and 4 deletions
25
.justfile
25
.justfile
|
|
@ -3,7 +3,10 @@ mod repo ".devfiles/justfile"
|
|||
|
||||
set dotenv-load := true
|
||||
|
||||
bin_name := "compendium"
|
||||
release_mode := "dev"
|
||||
container_registry := "git.alecodes.page/alecodes"
|
||||
container_image_name := container_registry / bin_name
|
||||
|
||||
[private]
|
||||
docker-compose +ARGS:
|
||||
|
|
@ -11,9 +14,6 @@ docker-compose +ARGS:
|
|||
|
||||
start-dev-services: (docker-compose "up --remove-orphans")
|
||||
|
||||
dev:
|
||||
watchexec --no-vcs-ignore --clear --restart --watch=dist --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }}
|
||||
|
||||
kitty-dev:
|
||||
kitten @ goto-layout tall
|
||||
kitten @ launch --cwd=current --dont-take-focus just build-frontend-watch
|
||||
|
|
@ -30,3 +30,22 @@ build-frontend-watch:
|
|||
|
||||
build-frontend:
|
||||
bun ./.devfiles/scripts/build-frontend.ts
|
||||
|
||||
build:
|
||||
podman build --tag {{ container_image_name }}:latest --cache-to {{ container_image_name }}-cache --cache-from {{ container_image_name }}-cache .
|
||||
|
||||
dev:
|
||||
watchexec --no-vcs-ignore --clear --restart --watch=dist --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }}
|
||||
|
||||
test:
|
||||
cargo test
|
||||
|
||||
publish: (build)
|
||||
podman push {{ container_image_name }}:latest
|
||||
podman push {{ container_image_name }}:latest {{ container_image_name }}:$(git rev-parse --short HEAD)
|
||||
|
||||
deploy:
|
||||
|
||||
clean:
|
||||
podman system prune --build
|
||||
cargo clean
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
# ── Javascript ──────────────────────────────────────────────────────────
|
||||
|
||||
FROM oven/bun:1 AS bun
|
||||
FROM docker.io/oven/bun:1 AS bun
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# install dependencies into temp directory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue