generated from alecodes/base-template
wip: change assets handling to vite-rs
This commit is contained in:
parent
6cf98d1f1a
commit
adbade7411
26 changed files with 761 additions and 112 deletions
18
.justfile
18
.justfile
|
|
@ -3,32 +3,32 @@ set dotenv-load := true
|
|||
bin_name := "compendium"
|
||||
release_mode := "dev"
|
||||
container_registry := "git.alecodes.page/alecodes"
|
||||
container_image_name := container_registry / bin_name
|
||||
container_image_name := container_registry / bin_name
|
||||
|
||||
# Start dev server
|
||||
dev:
|
||||
watchexec --clear --restart --watch=frontend --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }}
|
||||
watchexec --clear --restart --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }}
|
||||
|
||||
# Build the container locally
|
||||
build:
|
||||
podman build --tag {{ container_image_name }}:latest --cache-to {{ container_image_name }}-cache --cache-from {{ container_image_name }}-cache .
|
||||
podman build --tag {{ container_image_name }}:latest --cache-to {{ container_image_name }}-cache --cache-from {{ container_image_name }}-cache .
|
||||
|
||||
# Run tests
|
||||
test:
|
||||
cargo test
|
||||
cargo test
|
||||
|
||||
# Publish the project to the container registry
|
||||
publish +TAGS='latest':
|
||||
for tag in {{ TAGS }}; do podman push {{ container_image_name }}:latest {{ container_image_name }}:${tag}; done
|
||||
podman push {{ container_image_name }}:latest {{ container_image_name }}:$(git rev-parse --short HEAD)
|
||||
for tag in {{ TAGS }}; do podman push {{ container_image_name }}:latest {{ container_image_name }}:${tag}; done
|
||||
podman push {{ container_image_name }}:latest {{ container_image_name }}:$(git rev-parse --short HEAD)
|
||||
|
||||
deploy:
|
||||
|
||||
# Delete build artifacts
|
||||
clean:
|
||||
podman system prune --build
|
||||
cargo clean
|
||||
podman system prune --build
|
||||
cargo clean
|
||||
|
||||
# Bump crate version, this will also publish it
|
||||
bump:
|
||||
cog bump --auto
|
||||
cog bump --auto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue