overlay/.tools
Jared Allard 09d39ad36d
feat(updater): add 'checkout' and 'upload_artifact' steps
Adds a new `checkout` step intended to replace `git checkout` by
actually checking out the correct revision when running commands.

Adds a new `upload_artifact` step that uploads an artifact to a package
specific prefix. Primarily intended for supporting Go dependency
archives, but could also be used for anything.

Added `net-vpn/tailscale` using this new functionality.
2024-05-10 12:42:43 -07:00
..
.vscode feat: automatic updates and elint (#1) 2024-02-18 17:52:09 -08:00
cmd feat(updater): add 'checkout' and 'upload_artifact' steps 2024-05-10 12:42:43 -07:00
internal feat(updater): add 'checkout' and 'upload_artifact' steps 2024-05-10 12:42:43 -07:00
.gitignore feat: automatic updates and elint (#1) 2024-02-18 17:52:09 -08:00
.mise.toml feat: automatic updates and elint (#1) 2024-02-18 17:52:09 -08:00
go.mod feat(updater): add 'checkout' and 'upload_artifact' steps 2024-05-10 12:42:43 -07:00
go.sum feat(updater): add 'checkout' and 'upload_artifact' steps 2024-05-10 12:42:43 -07:00
README.md feat(updater): add 'checkout' and 'upload_artifact' steps 2024-05-10 12:42:43 -07:00

ebuild-updater

An automated ebuild updating system.

Usage

Requirements: docker.

Create an updater.yml file in the root of your repository. Create a key for each package that should be managed by the updater.

dev-util/mise:
  resolver: git
  options:
    # url where the git repository lives. HTTPS is recommended.
    url: https://github.com/jdx/mise

By default, if the only change that needs to be done during an upgrade is a rename of the ebuild and regenerating the manifest, you're done!

However, if you require custom logic (e.g., running pycargoebuild), you can specify steps to be ran during the upgrade process. An example for mise (a rust ebuild) is shown below.

dev-util/mise:
  resolver: git
  options:
    url: https://github.com/jdx/mise
  
  steps:
    - command: git clone https://github.com/jdx/mise .
    - original_ebuild: mise.ebuild
    - command: pycargoebuild -i mise.ebuild
    - ebuild: mise.ebuild

Note: All steps are ran inside of a Gentoo based docker image.

Configuration File

Key Description
resolver The resolver to use for the package. Valid options are git or apt.
options Options for the resolver.
steps Steps to be ran during the upgrade process.

git options

Key Description
url The URL where the git repository lives. HTTPS is recommended.

apt options

Key Description
repository Sources list entry for the APT repository
package The package name as it appears in the repository

steps

Key Description
command A command to be ran.
original_ebuild Path to write an ebuild
ebuild Path to read modified ebuild from

License

GPL-2.0