Packages with local sources
caquino opened this issue · 3 comments
Hi,
Is it possible to package only local files? I've tried to not specify a source on the recipe but it didnt'work.
I want to package a group of scripts that are only available locally.
If it possible to point source for a local directory ?
@caquino -- have you tried the directory
or local_path
source types?:
class MyRecipe < FPM::Cookery::Recipe
source "/path/to/my/directory/with/source/files", :with => :directory
# <snip> rest of recipe definition
end
Just in case anyone else come across this: it appears that fpm-cook will currently throw an 'unknown file type' error if you don't use a full path to your source file. See #147 for a full example.
With a full path, the directory handler appears to work as expected.
@caquino @cosmopetrich It is possible to use the :directory
method as described by @BaxterStockman or use a file URI.
Example:
class YourRecipe < FPM::Cookery::Recipe
source 'file:///path/to/your/source'
end
I will add a check to the :directory
source handler to throw an error if the path is not absolute.