Skip to content

Commit ab00d5a

Browse files
committed
rename run_command to post_process following the suggestions #33 (comment)
- no extra package is installed
1 parent 1433afb commit ab00d5a

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN pacman -S --noconfirm --needed --overwrite '*' \
66
git fakeroot binutils gcc awk binutils xz \
77
libarchive bzip2 coreutils file findutils \
88
gettext grep gzip sed ncurses util-linux \
9-
pacman-contrib base-devel
9+
pacman-contrib
1010

1111
COPY entrypoint.sh /entrypoint.sh
1212
COPY build.sh /build.sh

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Glob patterns will be expanded by bash when copying the files to the repository.
2929

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

32-
### `run_command`
32+
### `post_process`
3333

34-
**Optional** Install the package and run the specified command to make sure the installed package works.
34+
**Optional** A line of commands to execute after processing the package.
3535

3636
### `commit_username`
3737

action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ inputs:
2727
description: 'Command line flags for makepkg to build the package (if `test` is enabled)'
2828
required: false
2929
default: '--clean --cleanbuild --nodeps'
30-
run_command:
31-
description: 'Command to run after installing the package'
30+
post_process:
31+
description: 'A line of commands to execute after processing the package'
3232
required: false
33+
default: ''
3334
commit_username:
3435
description: 'The username to use when creating the new commit'
3536
required: true

build.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ assets=$INPUT_ASSETS
99
updpkgsums=$INPUT_UPDPKGSUMS
1010
test=$INPUT_TEST
1111
read -r -a test_flags <<< "$INPUT_TEST_FLAGS"
12-
run_command=$INPUT_RUN_COMMAND
12+
post_process=$INPUT_POST_PROCESS
1313
commit_username=$INPUT_COMMIT_USERNAME
1414
commit_email=$INPUT_COMMIT_EMAIL
1515
ssh_private_key=$INPUT_SSH_PRIVATE_KEY
@@ -93,13 +93,10 @@ cd /tmp/local-repo
9393
makepkg --printsrcinfo >.SRCINFO
9494
echo '::endgroup::'
9595

96-
if [ -n "$run_command" ]; then
97-
echo '::group::Installing package with makepkg and run command'
98-
git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si --noconfirm
96+
if [ -n "$post_process" ]; then
97+
echo '::group::Executing post process commands'
9998
cd /tmp/local-repo/
100-
grep -E 'depends' .SRCINFO | cut -f 3 -d ' '| sed -e 's/://' | xargs yay -S --noconfirm
101-
makepkg -si --noconfirm
102-
eval "$run_command"
99+
eval "$post_process"
103100
echo '::endgroup::'
104101
fi
105102

0 commit comments

Comments
 (0)