|
| 1 | +# devtest |
| 2 | + |
| 3 | +This tool helps manage, test, and update multiple AUR packages in a project-like structure. All packages are built in a completely clean chroot environment to test for errors and missing dependencies. |
| 4 | + |
| 5 | +If configured, this tool can also upload PKGBUILD changes to the AUR automatically after a successful build. |
| 6 | + |
| 7 | +If you're the maintainer of multiple AUR packages, devtest makes it easy to make sure all of your packages are working fine with just one simple command. |
| 8 | + |
| 9 | +## Installation |
| 10 | + |
| 11 | +Install via the [AUR](https://aur.archlinux.org/packages/devtest/). |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | + Usage: devtest [options] |
| 16 | + Usage: devtest [options] <package(s)> |
| 17 | + |
| 18 | + Options: |
| 19 | + -h, --help Displays usage information |
| 20 | + -v, --version Displays devtest version |
| 21 | + -V, --verbose Runs in verbose output mode for debugging purposes |
| 22 | + -u, --upload Upload package(s) to the AUR |
| 23 | + -i, --install Install package(s) after a successful build |
| 24 | + -c, --clean Clean build directories after successful build |
| 25 | + -R, --rebuild Rebuild chroot system and exit |
| 26 | + |
| 27 | +#### Testing |
| 28 | +To test a package, simply issue the command `devtest <package(s)>` and devtest will automatically download the PKGBUILD from the AUR and attempt to build it in a clean Arch chroot. |
| 29 | + |
| 30 | +#### Default packages |
| 31 | +If you have many packages you test frequently, you can add them to the config file (located by default at `~/.config/devtest/config`) |
| 32 | + |
| 33 | +Running `devtest` without specifying any packages will build all packages saved in the config file. |
| 34 | + |
| 35 | +#### Installing built packages |
| 36 | +To install a package after it's built, use `devtest -i <package(s)>` |
| 37 | + |
| 38 | +#### Updating PKGBUILD |
| 39 | +If you're an AUR maintainer, it might be useful to upload package changes to the AUR after a successful build. You can do so with `devtest -u <package(s)>`. |
| 40 | + |
| 41 | +NOTE: Correct SSH keys must be configured on your system and stored in the package maintainer's AUR account. See [here](https://wiki.archlinux.org/index.php/AUR_submission_guidelines#Authentication) for details. |
| 42 | + |
| 43 | +#### Option chaining |
| 44 | +Options can be chained together to make long commands easier to manage. For example, all of the following commands are valid syntax: |
| 45 | + |
| 46 | + devtest -Vui <package(s)> |
| 47 | + devtest <package(s)> -u --clean -iV |
| 48 | + devtest -install --clean -u |
| 49 | + devtest -i <package(s) --verbose |
| 50 | + |
| 51 | +## Configuration |
| 52 | + |
| 53 | +Default behavior can be tweaked to suit your needs by editing the config file (located by default at `~/.config/devtest/config`) |
| 54 | + |
| 55 | +- `PACKAGES` - List of packages to build when no packages specified |
| 56 | +- `PACKAGE_DIR` - Directory where PKGBUILDs are stored and built |
| 57 | +- `OUTPUT_DIR` - Directory where built packages are stored |
| 58 | +- `CHROOT_DIR` - Directory where the Arch chroot is created |
| 59 | +- `CUSTOM_PACMAN_CONF` - pacman configuration file to be used by the Arch chroot |
| 60 | +- `CUSTOM_MAKEPKG_CONF` - makepkg configuration file to be used by the Arch chroot |
| 61 | +- `CCACHE_ENABLED` - Enable ccache (required ccache to be installed) |
| 62 | +- `CCACHE_DIRECTORY` - Directory where build cache is stored if ccache is enabled |
| 63 | +- `CLEAN` - Whether or not to clean build directories after successful builds |
| 64 | +- `ASK_TO_UPLOAD` - Enables an upload prompt with the option to write a commit message after a successful build |
| 65 | +- `ASK_TO_INSTALL` - Enables an installation prompt after a successful build |
| 66 | +- `EXIT_ON_FAILURE` - If true, no other packages will be built after a build failure occurs |
0 commit comments