Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add makepkg option - optional basic check that PKGBUILD could be built #31

Merged
merged 2 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`.

### `makepkg`

**Optional** Build package using `makepkg` before deploy.

### `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'
makepkg:
description: 'Build package using `makepkg` before deploy'
rgeraskin marked this conversation as resolved.
Show resolved Hide resolved
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
makepkg=$INPUT_MAKEPKG
rgeraskin marked this conversation as resolved.
Show resolved Hide resolved
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 [ "$makepkg" == "true" ]; then
rgeraskin marked this conversation as resolved.
Show resolved Hide resolved
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