Getting a developer setup
VM
We highly suggest you use a virtualized environment to test your swizzin set up. It is extremely convenient to have this isolated from the rest of your system, and be able to discard and initialize a system within minutes.
Multipass
- Enable virtualization OS and BIOS side
- Install multipass
- Run
multipass shell
to start a default primary VM and join the shell. - Get swizzin repo on your VM
- You can mount it wherever you want (your user directory should be auto-mounted into
/home/ubuntu
if you're using theprimary
instance) - You can clone it wherever you want
- You can mount it wherever you want (your user directory should be auto-mounted into
- Install swizzin with
bash /path/to/setup.sh --local
LXD
TODO
Parallels
- Download your image
- Create a VM
- Run through the OS install
- Get swizzin repo on your VM
- You can mount it wherever you want
- You can clone it wherever you want
- Install swizzin with
bash /path/to/setup.sh --local
- Make a snapshot
Editor and source code
We highly suggest you keep your code on your host and mount it into your VM so your changes are kept when you throw away VMs, and so that you need to set up your git environment only once
Our development setup is basically made for VSCode/Codium
Plugins
TODO
Please see contributors.md in the main repo while this is under development
Installation
This will install swizzin and as part of the setup, symlink your folder to /etc/swizzin/
. This is useful if your virtualization auto-mounts from your host.
bash /path/to/setup.sh --local
You can also already have the swizzin folder mounted/cloned in /etc/
, this option will switch to use the .dev.lock
option. This is useful if you're manually mounting the folder from your host, or have cloned directly into your VM.
bash /etc/swizzin/setup.sh --local
Updating mechanism
The updater will always reset /etc/swizzin
to the latest commit in master
, which you don't necessarily always want.
We have made a couple ways to make sure that you can skip that, so that you can then manipulate the content of the directory on your own.
- Running
box update --local
- Making
/etc/swizzin
a symlink to some other directory on your FS- This should be done for you if you ran
setup.sh
when it was located outside of/etc/swizzin
with--local
- This should be done for you if you ran
- Adding
.dev.lock
to/etc/swizzin/
- This should be done for you if you ran
setup.sh
when it was located in/etc/swizzin
with--local
- You can do
touch /etc/swizzin/.dev.lock
- This should be done for you if you ran
Testing mechanism
You can run box test
to test whether all packages are performing as intended. You can supply a specific set of packages (e.g. box test app1 app2
) to test specifically those.
If you create .test.lock
in /etc/swizzin
, the test will be performed on every applicable box
command executed (package and user management ones)
Working across forks
If you need a branch from someplace else, please use the GitHub CLI tool gh
You can read how to install and use the tool on the GitHub CLI website.
You can then just run gh pr checkout 401
to checkout PR #401