build(run): add console task

This commit is contained in:
Oliver Davies 2022-04-06 22:15:40 +01:00
parent 5cc1fb748b
commit 178fc87383
2 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,6 @@ A Symfony console application used by the [PHP South Wales user group](https://w
Run the `meetup:pick-winner` command to retrieve the 'yes' RSVPs from Meetup for an event, and select a winner at random. The only argument is the Meetup event ID, which is required. Run the `meetup:pick-winner` command to retrieve the 'yes' RSVPs from Meetup for an event, and select a winner at random. The only argument is the Meetup event ID, which is required.
./bin/console meetup:pick-winner <event_id> ./run console meetup:pick-winner <event_id>
RSVPs by event hosts (i.e. organisers) are automatically removed so that they are not returned. RSVPs by event hosts (i.e. organisers) are automatically removed so that they are not returned.

7
run
View file

@ -29,6 +29,13 @@ function composer {
${DOCKER_TAG} "${@}" ${DOCKER_TAG} "${@}"
} }
function console {
docker container run --rm -t \
--entrypoint php \
${DOCKER_TAG} \
bin/console ${@}
}
function help { function help {
printf "%s <task> [args]\n\nTasks:\n" "${0}" printf "%s <task> [args]\n\nTasks:\n" "${0}"