[Feature Request] Implement PostBuildCommand
Have you checked the readme and man page for this feature? yes Have you checked previous issues for this feature? yes
I have this script I'd like to execute in the working directory of a built package that pushes the package to my self-hosted package cache. Could it be possible to implement a PostBuildCommand argument to have paru automatically invoke it for me?
I just added a PR for your feature request. I just started using Paru, and I am also fairly new to Rust coding, so no clue what @Morganamilo will address.
But for now, if you want to test it, you can build a new Paru version yourself.
Just download the code from my linked Pull Request and build it with
cargo build --release
The only thing I am not sure is where to place the execution of the command in the timeline. Because if the command fails for some reason, then the installation will also fail, if it is a build_install. but maybe you can test it and give some feedback.
While I'm fine with post build command as to have symmetry with the existing pre build command. Consider if it would work better to just make a post transaction alpm hook and rsync the whole directory over after each transaction.