Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have implemented the post-build command feature. Here's what I did:
Added post-build command parsing in
command_line.rs
:--post-build-command
argumentconfig.post_build_command
Created a
post_build_command
function ininstall.rs
:pre_build_command
, it executes a shell command after successful package buildPKGBASE
andVERSION
environment variablesAdded post-build command execution in
install.rs
:post_build_command
after a successful package buildAdded post-build command config in
config.rs
:PostBuildCommand
option to the config file parser[bin]
sectionUsers can specify a post-build command in these ways:
paru --post-build-command "your-command"
The command will receive:
PKGBASE
: The base package nameVERSION
: The package versionTested with
cargo run -- -S vim-git --post-build-command "/tmp/code/paru/test.sh"
and
paru.conf
closes #1300
Waiting for feedback where to place
post_build_command(config, dir, base.package_base(), &version)?;