Dump Plugin: Source parameter with ../ in the path


I am making two different snaps from the same project with classic and strict confinements.
In my snapcraft.yaml I am using the dump plugin.

since the project files are the same I wanted to make two directories for instance dist-strict and dist-classic with their own snapcraft.yaml files and package them using the same project files in my ../dist directory.
But after several tries I found out the source parameter ignores the "../" path and wont go one level up. I can duplicate my project files for each snapcraft.yaml but it’s not an elegant solution.

    plugin: dump
    source: ../dist
    source-type: local

I was wondering if there is something I’m missing? Or if there is a way around this?

You cannot reference sources outside of the project’s directory (which is where snap is expected to be found).

I have seen some people work around this by storing each snap directory somewhere nested, e.g.:


Then just symlinking ./snap to the one you want to build.

Thank you for the suggestion.
I will give it a try.

I tried it. Symlinks are not working.
We can only get it to work by copying the file or making a hard link.