user3803112 user3803112 - 2 months ago 14
YAML Question

Issues while validating snapcraft.yaml: '/home/Desktop/xxx-snappy/folder/' is not of type 'object'

the below is my snap file. Can you explain me how to use copy plugin. I just want to copy the file form one folder to another.

name: xxx
version: 6.0
# The vendor for the snap (replace 'Vendor <email@example.com>')
vendor: xxx@gmail.com
summary: a sample package
description: blah blah blah
icon: icon.png

parts:
glue:
plugin: copy
source: /home/Desktop/xxx-snappy/folder/
files:
.: /bin/xxx

Answer

This looks like you're using snapcraft v1.x, is that correct? Assuming so, this YAML looks good except for the indentation within parts; it's not actually valid YAML. Try this:

name: netsnapper
version: 6.0
# The vendor for the snap (replace 'Vendor <email@example.com>')
vendor: amritha2.rajeevan@aricent.com
summary: a sample package
description: Netsnapper is a unique integrated solution that offers speed, security, switching across multiple networks, persistence of running application sessions 
icon: icon.png

parts:
  glue:
    plugin: copy
    source: /home/aricent/Desktop/amritha-snappy/netsnapper/
    files: 
      .: /bin/netsnapper