Skip to content

Commit

Permalink
build: update clean module
Browse files Browse the repository at this point in the history
  • Loading branch information
iahmadgad committed Dec 11, 2024
1 parent ce030e8 commit b6d2018
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 38 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ List recipes in `justfile`:
```sh
just --list
```
List recipes in another file:
List recipes in module:
```sh
just --list path/to/file
just --list <module>
```
Just recipes are located in `justfile` and `justmodules` directory.

Expand Down
34 changes: 32 additions & 2 deletions justmodules/clean.just
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
default *FLAGS:
cargo clean {{ FLAGS }}

dir +TARGET_DIR:
cargo clean --target-dir target/{{ TARGET_DIR }}

backups:
find {{ justfile_directory() }} -type f -name '*~' -exec rm -f {} +

mod deb 'clean/deb.just'
doc:
find {{ justfile_directory() }} -type d -wholename "{{ justfile_directory() }}/target/doc" -exec rm -rf {} +

debug:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/debug' -exec rm -rf {} +

release:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/release' -exec rm -rf {} +

aarch64-linux-android:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/aarch64-linux-android' -exec rm -rf {} +

alias aarch64 := aarch64-linux-android

arm-linux-androideabi:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/arm-linux-androideabi' -exec rm -rf {} +

mod target 'clean/target.just'
alias arm := arm-linux-androideabi

x86_64-linux-android:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/x86_64-linux-android' -exec rm -rf {} +

alias x86_64 := x86_64-linux-android

i686-linux-android:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/i686-linux-android' -exec rm -rf {} +

alias i686 := i686-linux-android

mod deb 'clean/deb.just'
6 changes: 3 additions & 3 deletions justmodules/clean/deb.just
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
default:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/deb' -exec rm -rf {} +
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/deb' -exec rm -rf {} +

packages:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/deb/packages' -exec rm -rf {} +
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/deb/packages' -exec rm -rf {} +

manifests:
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/deb/manifests' -exec rm -rf {} +
find {{ justfile_directory() }} -type d -wholename '{{ justfile_directory() }}/target/deb/manifests' -exec rm -rf {} +
31 changes: 0 additions & 31 deletions justmodules/clean/target.just

This file was deleted.

0 comments on commit b6d2018

Please sign in to comment.