Isso é possível. snapcraft help copy
sabe mais sobre o assunto:
- files:
(object)
A dictionary of key-value pairs. The key is the current location of the
file relative to snapcraft.yaml (unless 'source' is specified, in which
case it's relative to the root of the source). The value is where to
place the file in-snap, and is relative to the root of the snap. This
works like 'cp -r <key> <value>'. Note that globbing is supported for the
key, allowing one to use *, ?, and character ranges expressed with [].
Usando snapcraft init
, criei um projeto muito rápido para isso:
daniel@daydream:~/test$ touch bla .bla blubb .blubb
daniel@daydream:~/test$ find
.
./blubb
./.bla
./bla
./snapcraft.yaml
./.blubb
daniel@daydream:~/test$
O arquivo snapcraft.yaml
tem esta aparência:
name: my-snap
version: 0
summary: This is my-snap's summary
description: This is my-snap's description
confinement: devmode
parts:
my-part:
plugin: copy
files:
"*": contents/
".*": contents/
Depois de executar snapcraft
, posso ver os seguintes arquivos no pacote:
daniel@daydream:~/test$ find prime/
prime/
prime/meta
prime/meta/snap.yaml
prime/contents
prime/contents/blubb
prime/contents/.bla
prime/contents/bla
prime/contents/.blubb
daniel@daydream:~/test$