chore: first commit
This commit is contained in:
commit
4f811d88f2
30 changed files with 4301 additions and 0 deletions
34
.justfile
Normal file
34
.justfile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
set dotenv-load := true
|
||||
|
||||
bin_name := "compendium"
|
||||
release_mode := "dev"
|
||||
container_registry := "git.alecodes.page/alecodes"
|
||||
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 { "" } }}
|
||||
|
||||
# Build the container locally
|
||||
build:
|
||||
podman build --tag {{ container_image_name }}:latest --cache-to {{ container_image_name }}-cache --cache-from {{ container_image_name }}-cache .
|
||||
|
||||
# Run tests
|
||||
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)
|
||||
|
||||
deploy:
|
||||
|
||||
# Delete build artifacts
|
||||
clean:
|
||||
podman system prune --build
|
||||
cargo clean
|
||||
|
||||
# Bump crate version, this will also publish it
|
||||
bump:
|
||||
cog bump --auto
|
||||
Loading…
Add table
Add a link
Reference in a new issue