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_registry := "git.alecodes.page/alecodes"
|
||||||
container_image_name := container_registry / bin_name
|
container_image_name := container_registry / bin_name
|
||||||
|
|
||||||
|
# Start dev server
|
||||||
dev:
|
dev:
|
||||||
watchexec --clear --restart --watch=frontend --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }}
|
watchexec --clear --restart --watch=frontend --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }}
|
||||||
|
|
||||||
|
# Build the container locally
|
||||||
build:
|
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:
|
test:
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
publish: (build)
|
# Publish the project to the container registry
|
||||||
podman push {{ container_image_name }}:latest
|
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)
|
podman push {{ container_image_name }}:latest {{ container_image_name }}:$(git rev-parse --short HEAD)
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
|
||||||
|
# Delete build artifacts
|
||||||
clean:
|
clean:
|
||||||
podman system prune --build
|
podman system prune --build
|
||||||
cargo clean
|
cargo clean
|
||||||
|
|
||||||
|
# Bump crate version, this will also publish it
|
||||||
bump:
|
bump:
|
||||||
cog bump --auto
|
cog bump --auto
|
||||||
|
|
|
||||||
1
cog.toml
1
cog.toml
|
|
@ -9,6 +9,7 @@ skip_ci = "[skip ci]"
|
||||||
skip_untracked = false
|
skip_untracked = false
|
||||||
pre_bump_hooks = [
|
pre_bump_hooks = [
|
||||||
"sed -E -i 's/(\"version\":) \"[0-9.]{5}\"/\\1 \"{{version|0.0.1}}\"/gi' package.json",
|
"sed -E -i 's/(\"version\":) \"[0-9.]{5}\"/\\1 \"{{version|0.0.1}}\"/gi' package.json",
|
||||||
|
"just build",
|
||||||
"just publish",
|
"just publish",
|
||||||
"echo 'bumping from {{latest|0.0.0}} to {{version|0.0.1}}'",
|
"echo 'bumping from {{latest|0.0.0}} to {{version|0.0.1}}'",
|
||||||
"cargo bump {{version|0.0.1}}",
|
"cargo bump {{version|0.0.1}}",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue