We want to make sure everyone develops using a consistent base, to ensure that these instructions rely on LXD (use whatever is convenient as long as you do not stray away from an Ubuntu 16.04 LTS base)
Clone these sources and make it your working directory:
git clone https://github.com/snapcore/snapcraft.git
cd snapcraft
If you already have LXD setup you can skip this part, if not, run:
sudo snap install lxd
sudo lxd init --auto --storage-backend=dir
sudo adduser "$USER" lxd
newgrp lxd
Setup the environment by running:
./tools/environment-setup.sh
To work inside this environment, run:
lxc exec snapcraft-dev -- sudo -iu ubuntu bash
Import your keys (ssh-import-id
) and add a Host
entry to your ssh config if you are interested in Code's Remote-SSH plugin.
See the Testing guide.
Given that the --debug
option in snapcraft is reserved for project specific debugging, enabling for the logger.debug
calls is achieved by setting the "SNAPCRAFT_ENABLE_DEVELOPER_DEBUG" environment variable to a truthful value. Snapcraft's internal tools, e.g.; snapcraftctl
should pick up this environment variable as well.
Oftentimes all you want to do is see if a given pull request solves the issue you were having. To make this easier, the Travis CI setup for snapcraft publishes the resulting snap that was built for x86-64 using transfer.sh
.
To download the snap, find the relevant CI job run for the PR under review and locate the "snap" stage, the URL to download from will be located at the end of logs for that job.
We'd love the help!
- Submit pull requests against snapcraft
- Make sure to read the contribution guide
- Find us under the snapcraft category of the forum https://forum.snapcraft.io
- Discuss with us using IRC in #snapcraft on Freenode.