generated from alecodes/base-template
chore: add docs to just commands
This commit is contained in:
parent
1815487517
commit
6cf98d1f1a
2 changed files with 9 additions and 2 deletions
10
.justfile
10
.justfile
|
|
@ -5,24 +5,30 @@ 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: (build)
|
||||
podman push {{ container_image_name }}:latest
|
||||
# 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
|
||||
|
|
|
|||
1
cog.toml
1
cog.toml
|
|
@ -9,6 +9,7 @@ skip_ci = "[skip ci]"
|
|||
skip_untracked = false
|
||||
pre_bump_hooks = [
|
||||
"sed -E -i 's/(\"version\":) \"[0-9.]{5}\"/\\1 \"{{version|0.0.1}}\"/gi' package.json",
|
||||
"just build",
|
||||
"just publish",
|
||||
"echo 'bumping from {{latest|0.0.0}} to {{version|0.0.1}}'",
|
||||
"cargo bump {{version|0.0.1}}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue