Skip to content

Commit

Permalink
Fix echo color
Browse files Browse the repository at this point in the history
  • Loading branch information
otacke committed Apr 30, 2024
1 parent 3a69cdf commit 57156f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/run-playwright.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

echo "${COLOR_BLUE}Running end-to-end tests${COLOR_OFF}"
echo -e "${COLOR_BLUE}Running end-to-end tests${COLOR_OFF}"

npx playwright test "$H5P_CONTENT_REPOSITORY_DIR/tests/main.spec.js"
2 changes: 1 addition & 1 deletion .github/scripts/setup-test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

echo "${COLOR_BLUE}Setting up test content${COLOR_OFF}"
echo -e "${COLOR_BLUE}Setting up test content${COLOR_OFF}"

if [ ! -d "$H5P_CONTENT_REPOSITORY_DIR/assets" ]; then
mkdir assets
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/start-h5p-cli-server.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

echo "${COLOR_BLUE}Starting H5P CLI server${COLOR_OFF}"
echo -e "${COLOR_BLUE}Starting H5P CLI server${COLOR_OFF}"

if ! netstat -tln | grep ":8080 " >/dev/null; then
cd "$H5P_CLI_DIR"
Expand All @@ -12,8 +12,8 @@ if ! netstat -tln | grep ":8080 " >/dev/null; then
H5P_CLI_SERVER_PID=$!
export H5P_CLI_SERVER_PID

echo "${COLOR_BLUE}...Started H5P CLI server detached with PID $H5P_CLI_SERVER_PID${COLOR_OFF}"
echo -e "${COLOR_BLUE}...Started H5P CLI server detached with PID $H5P_CLI_SERVER_PID${COLOR_OFF}"
cd "$H5P_CONTENT_REPOSITORY_DIR"
else
echo "${COLOR_RED}...Could not start H5P CLI server, is it running already? Will assume it is.${COLOR_OFF}"
echo -e "${COLOR_RED}...Could not start H5P CLI server, is it running already? Will assume it is.${COLOR_OFF}"
fi
4 changes: 2 additions & 2 deletions .github/scripts/stop-h5p-cli-server.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

echo "${COLOR_BLUE}Stopping H5P CLI server${COLOR_OFF}"
echo -e "${COLOR_BLUE}Stopping H5P CLI server${COLOR_OFF}"

if [ -n "$H5P_CLI_SERVER_PID" ]; then
kill $H5P_CLI_SERVER_PID
Expand All @@ -9,6 +9,6 @@ else
PROBABLE_ID=$(lsof -i :8080 -sTCP:LISTEN -n -P | grep LISTEN | grep node | grep $(whoami) | awk '{print $2}')

if [ -n "$PROBABLE_ID" ]; then
echo "${COLOR_RED}... A server seems to have been running before running the test. You should be able to stop it manually yourself or by running 'kill -9 $PROBABLE_ID'${COLOR_OFF}"
echo -e "${COLOR_RED}... A server seems to have been running before running the test. You should be able to stop it manually yourself or by running 'kill -9 $PROBABLE_ID'${COLOR_OFF}"
fi
fi

0 comments on commit 57156f9

Please sign in to comment.