Below you will find some instructions to help you contribute to this snap. The general workflow will be to submit PRs from your fork onto the "stable" branch. Once the pull request has been submitted, there is a GitHub action that will automatically launch a build of the snap that you can use for testing. And then once the PR has been merged the GitHub action will launch a build on launchpad that will be automatically uploaded to the snap store, in the candidate channel, for more extensive testing.
Here is the workflow for submitting a change to the stable branch, and getting it published in the snap store in the candidate channel. If this is your first time contributing to this snap, then there are a couple of things you need to do as a one-time setup to get ready to submit your first pull request:
- Fork the repository into your own GitHub namespace.
- Clone your fork.
- In addition to your fork, you need to also add this remote repository. To make things a bit more intuitive, let's rename your fork's remote too (since "origin" is hardly descriptive):
git remote rename origin myfork
git remote add kenvandine https://github.com/kenvandine/xournalpp.git
git fetch --all
To test your changes, you'll need to build your snap. You can do this with either multipass
snapcraft
or with lxd:
snapcraft --use-lxd --debug
The --debug option will just drop you into the snap if a build error occurs, so you can further triage. It is completely optional and can be left off.
Once the build finishes, you will have .snap in your current directory. Install it on a test system to test the changes.
sudo snap install <yoursnap>.snap --dangerous
Note you need to add the --dangerous flag because the snap is not being installed from the store (and signed by the store certificate, so it's an auto trusted source).
Once you're all setup for contributing, keep in mind that you want the git information to be all up-to-date. So if you haven't "fetched" all changes in a while, start with that:
git fetch --all -p
Now that your git metadata has been updated you are ready to create a bugfix branch, make your changes, and open a PR.
- All PRs should go to the stable branch so create your branch as a copy of the stable branch:
git checkout -b my-bugfix-branch kenvandine/stable
- Make your desired changes and push them to your fork:
git push myfork my-bugfix-branch
Once this branch has been pushed to your fork, you should update the local branch tracking so it tracks the branch pushed to your fork:
git branch -u myfork/my-bugfix-branch
- When you feel they're ready for submitting to the main repository (stable branch), open up a pull request from your
my-bugfix-branchto thekenvandine/stablebranch. - Once you've opened the PR, it will automatically trigger the build-test action that will launch a build of the snap. You can watch the progress of the snap build from your PR (Show all checks -> Details). Once the snap build has completed, you can find the built snap (to test with) under "Artifacts".
- Someone from the team will review the open PR and either merge it or start a discussion with you with additional changes or clarification needed.