Skip to content

Commit

Permalink
Merge pull request #31 from rgeraskin/master
Browse files Browse the repository at this point in the history
Add makepkg option - optional basic check that PKGBUILD could be built
  • Loading branch information
KSXGitHub committed Aug 10, 2022
2 parents 58b29e7 + 89cbe4c commit 325b53d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Glob patterns will be expanded by bash when copying the files to the repository.

**Optional** Update checksums using `updpkgsums`.

### `test`

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

### `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 @@ -19,6 +19,10 @@ inputs:
description: 'Update checksums using `updpkgsums`'
required: false
default: 'false'
test:
description: 'Check that PKGBUILD could be built'
required: false
default: 'false'
commit_username:
description: 'The username to use when creating the new commit'
required: true
Expand Down
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pkgname=$INPUT_PKGNAME
pkgbuild=$INPUT_PKGBUILD
assets=$INPUT_ASSETS
updpkgsums=$INPUT_UPDPKGSUMS
test=$INPUT_TEST
commit_username=$INPUT_COMMIT_USERNAME
commit_email=$INPUT_COMMIT_EMAIL
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
Expand Down Expand Up @@ -78,6 +79,13 @@ if [ "$updpkgsums" == "true" ]; then
echo '::endgroup::'
fi

if [ "$test" == "true" ]; then
echo '::group::Building package with makepkg'
cd /tmp/local-repo/
makepkg --clean --cleanbuild --nodeps
echo '::endgroup::'
fi

echo '::group::Generating .SRCINFO'
cd /tmp/local-repo
makepkg --printsrcinfo >.SRCINFO
Expand Down

0 comments on commit 325b53d

Please sign in to comment.