doc: improve justfile doc.

This commit is contained in:
Alexandre Pujol 2025-04-27 14:38:31 +02:00
parent 4bb57bed22
commit b8f2f38c72
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -2,8 +2,6 @@
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
# Integration environment for apparmor.d
#
# Usage: # Usage:
# just # just
# just img ubuntu24 server # just img ubuntu24 server
@ -63,9 +61,8 @@ prefix := "aa-"
[doc('Show this help message')] [doc('Show this help message')]
help: help:
@echo -e "Integration environment helper for apparmor.d\n"
@just --list --unsorted @just --list --unsorted
@echo -e "\nSee https://apparmor.pujol.io/development/vm/ for more information." @echo -e "\nSee https://apparmor.pujol.io/development/ for more information."
[doc('Build the go programs')] [doc('Build the go programs')]
build: build:
@ -160,7 +157,7 @@ clean:
debian/.debhelper debian/debhelper* debian/*.debhelper debian/{{pkgname}} \ debian/.debhelper debian/debhelper* debian/*.debhelper debian/{{pkgname}} \
.pkg/{{pkgname}}* {{build}} coverage.out .pkg/{{pkgname}}* {{build}} coverage.out
[doc('Build the apparmor.d package')] [doc('Build the package in a clean OCI container')]
package dist: package dist:
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail set -eu -o pipefail
@ -175,7 +172,7 @@ package dist:
fi fi
bash dists/docker.sh $dist $version bash dists/docker.sh $dist $version
[doc('Build the image')] [doc('Build the VM image')]
img dist flavor: (package dist) img dist flavor: (package dist)
@mkdir -p {{base_dir}} @mkdir -p {{base_dir}}
packer build -force \ packer build -force \
@ -238,7 +235,7 @@ list:
@echo -e '\033[1m Id Distribution Flavor State\033[0m' @echo -e '\033[1m Id Distribution Flavor State\033[0m'
@virsh {{c}} list --all | grep {{prefix}} | sed 's/{{prefix}}//g' @virsh {{c}} list --all | grep {{prefix}} | sed 's/{{prefix}}//g'
[doc('List the images')] [doc('List the VM images')]
images: images:
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail set -eu -o pipefail
@ -254,7 +251,7 @@ images:
} }
' '
[doc('List the machine that can be created')] [doc('List the VM images that can be created')]
available: available:
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu -o pipefail set -eu -o pipefail