Skip to content

Commit

Permalink
Add test_flags input
Browse files Browse the repository at this point in the history
The input sets the command-line flags provided to `makepkg` when
trying to build the package (if the `test` option is enabled).
The input is optional and its default value is the same as before
introducing this input.
  • Loading branch information
fuljo committed Nov 13, 2022
1 parent 325b53d commit 4045af8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Glob patterns will be expanded by bash when copying the files to the repository.

**Optional** Check that PKGBUILD could be built.

### `test_flags`

**Optional** Command line flags for makepkg to build the package (if `test` is enabled). The default flags are `--clean --cleanbuild --nodeps`.

### `commit_username`

**Required** The username to use when creating the new commit.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ inputs:
description: 'Check that PKGBUILD could be built'
required: false
default: 'false'
test_flags:
description: 'Command line flags for makepkg to build the package (if `test` is enabled)'
required: false
default: '--clean --cleanbuild --nodeps'
commit_username:
description: 'The username to use when creating the new commit'
required: true
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pkgbuild=$INPUT_PKGBUILD
assets=$INPUT_ASSETS
updpkgsums=$INPUT_UPDPKGSUMS
test=$INPUT_TEST
test_flags=$INPUT_TEST_FLAGS
commit_username=$INPUT_COMMIT_USERNAME
commit_email=$INPUT_COMMIT_EMAIL
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
Expand Down Expand Up @@ -82,7 +83,7 @@ fi
if [ "$test" == "true" ]; then
echo '::group::Building package with makepkg'
cd /tmp/local-repo/
makepkg --clean --cleanbuild --nodeps
makepkg $test_flags
echo '::endgroup::'
fi

Expand Down

0 comments on commit 4045af8

Please sign in to comment.