Skip to content

Commit 325b53d

Browse files
authored
Merge pull request #31 from rgeraskin/master
Add makepkg option - optional basic check that PKGBUILD could be built
2 parents 58b29e7 + 89cbe4c commit 325b53d

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Glob patterns will be expanded by bash when copying the files to the repository.
2121

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

24+
### `test`
25+
26+
**Optional** Check that PKGBUILD could be built.
27+
2428
### `commit_username`
2529

2630
**Required** The username to use when creating the new commit.

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ inputs:
1919
description: 'Update checksums using `updpkgsums`'
2020
required: false
2121
default: 'false'
22+
test:
23+
description: 'Check that PKGBUILD could be built'
24+
required: false
25+
default: 'false'
2226
commit_username:
2327
description: 'The username to use when creating the new commit'
2428
required: true

build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pkgname=$INPUT_PKGNAME
77
pkgbuild=$INPUT_PKGBUILD
88
assets=$INPUT_ASSETS
99
updpkgsums=$INPUT_UPDPKGSUMS
10+
test=$INPUT_TEST
1011
commit_username=$INPUT_COMMIT_USERNAME
1112
commit_email=$INPUT_COMMIT_EMAIL
1213
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
@@ -78,6 +79,13 @@ if [ "$updpkgsums" == "true" ]; then
7879
echo '::endgroup::'
7980
fi
8081

82+
if [ "$test" == "true" ]; then
83+
echo '::group::Building package with makepkg'
84+
cd /tmp/local-repo/
85+
makepkg --clean --cleanbuild --nodeps
86+
echo '::endgroup::'
87+
fi
88+
8189
echo '::group::Generating .SRCINFO'
8290
cd /tmp/local-repo
8391
makepkg --printsrcinfo >.SRCINFO

0 commit comments

Comments
 (0)