Skip to content

Commit

Permalink
Add some more reusable scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Oct 10, 2023
1 parent 7ce0d20 commit 5f01995
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
13 changes: 13 additions & 0 deletions bin/tests-destroy
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# -e Exit immediately if a pipeline returns a non-zero status
# -o pipefail Produce a failure return code if any command errors
set -eo pipefail

# Args
PLUGIN=${PWD##*/}

# Environment variables
export COMPOSE_PROJECT_NAME=${PLUGIN}

docker compose down --volumes --remove-orphans
13 changes: 13 additions & 0 deletions bin/tests-start
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# -e Exit immediately if a pipeline returns a non-zero status
# -o pipefail Produce a failure return code if any command errors
set -eo pipefail

# Args
PLUGIN=${PWD##*/}

# Environment variables
export COMPOSE_PROJECT_NAME=${PLUGIN}

docker compose up -d
13 changes: 13 additions & 0 deletions bin/tests-stop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# -e Exit immediately if a pipeline returns a non-zero status
# -o pipefail Produce a failure return code if any command errors
set -eo pipefail

# Args
PLUGIN=${PWD##*/}

# Environment variables
export COMPOSE_PROJECT_NAME=${PLUGIN}

docker compose down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
"bin": [
"bin/acceptance-tests",
"bin/build-vendor",
"bin/integration-tests"
"bin/integration-tests",
"bin/tests-destroy",
"bin/tests-start",
"bin/tests-stop"
],
"config": {
"allow-plugins": {
Expand Down

0 comments on commit 5f01995

Please sign in to comment.