Skip to content

Commit

Permalink
Merge pull request #29 from Thyrum/master
Browse files Browse the repository at this point in the history
Add `updpkgsums` option
  • Loading branch information
KSXGitHub committed Jul 29, 2022
2 parents e994b94 + 1bb3c12 commit c6e9678
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ RUN pacman -S --noconfirm --needed --overwrite '*' \
openssh sudo \
git fakeroot binutils gcc awk binutils xz \
libarchive bzip2 coreutils file findutils \
gettext grep gzip sed ncurses util-linux
gettext grep gzip sed ncurses util-linux \
pacman-contrib

COPY entrypoint.sh /entrypoint.sh
COPY build.sh /build.sh
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
description: 'Newline-separated glob patterns for additional files to be added to the AUR repository'
required: false
default: ''
updpkgsums:
description: 'Update checksums using `updpkgsums`'
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 @@ -6,6 +6,7 @@ set -o errexit -o pipefail -o nounset
pkgname=$INPUT_PKGNAME
pkgbuild=$INPUT_PKGBUILD
assets=$INPUT_ASSETS
updpkgsums=$INPUT_UPDPKGSUMS
commit_username=$INPUT_COMMIT_USERNAME
commit_email=$INPUT_COMMIT_EMAIL
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
Expand Down Expand Up @@ -70,6 +71,13 @@ if [[ -n "$assets" ]]; then
fi
echo '::endgroup::'

if [ "$updpkgsums" == "true" ]; then
echo '::group::Updating checksums'
cd /tmp/local-repo/
updpkgsums
echo '::endgroup::'
fi

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

0 comments on commit c6e9678

Please sign in to comment.