bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

option to clean to clean cache and pkg #129

Open glensc opened 9 years ago

glensc commented 9 years ago

would be nice for clean command to have option to clean also cache and pkg dirs.

# ls -l
total 12K
-rw-rw-r-- 1 vagrant vagrant 251 Sep  9 10:56 admin.rb
-rw-rw-r-- 1 vagrant vagrant 242 Sep  8 12:09 fe.rb
-rw-rw-r-- 1 vagrant vagrant 221 Sep  9 10:54 recipe.rb

# fpm-cook package -p centos
...

# ls -l
total 12
-rw-rw-r-- 1 vagrant vagrant 251 Sep  9 10:56 admin.rb
drwxrwxr-x 1 vagrant vagrant  18 Sep  9 10:58 cache/
-rw-rw-r-- 1 vagrant vagrant 242 Sep  8 12:09 fe.rb
drwxrwxr-x 1 vagrant vagrant  89 Sep  9 10:58 pkg/
-rw-rw-r-- 1 vagrant vagrant 221 Sep  9 10:54 recipe.rb
drwxrwxr-x 1 vagrant vagrant  18 Sep  9 10:58 tmp-build/
drwxrwxr-x 1 vagrant vagrant   6 Sep  9 10:58 tmp-dest/

# fpm-cook clean -p centos 
===> Cleanup!

# ls -l
total 12
-rw-rw-r-- 1 vagrant vagrant 251 Sep  9 10:56 admin.rb
drwxrwxr-x 1 vagrant vagrant  18 Sep  9 10:58 cache/
-rw-rw-r-- 1 vagrant vagrant 242 Sep  8 12:09 fe.rb
drwxrwxr-x 1 vagrant vagrant  89 Sep  9 10:58 pkg/
-rw-rw-r-- 1 vagrant vagrant 221 Sep  9 10:54 recipe.rb

# fpm-cook clean -p centos --help
Usage:
    fpm-cook clean [OPTIONS] [RECIPE]

Parameters:
    [RECIPE]                      the recipe file (default: "recipe.rb")

Options:
    -c, --color                   toggle color
    -D, --debug                   enable debug output
    -t, --target TARGET           set desired fpm output target (deb, rpm, etc)
    -p, --platform PLATFORM       set the target platform (centos, ubuntu, debian)
    -q, --quiet                   Disable verbose output like progress bars
    -V, --version                 show fpm-cookery and fpm version
    --[no-]deps                   enable/disable dependency checking
    --tmp-root DIR                directory root for temporary files
    --pkg-dir DIR                 directory for built packages
    --cache-dir DIR               directory for downloaded sources
    --skip-package                do not call FPM to build the package
    -h, --help                    print help