Last active
April 14, 2017 12:53
-
-
Save DZunke/6e7cac40ca59837bd29804cc97b49844 to your computer and use it in GitHub Desktop.
PHPUnit Notifications for Windows 10 Linux Subsystem (Creators Update)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
###################################### | |
#### | |
#### PHPUnit Test Notifications for Windows Linux Subsystem (Creators Update) | |
#### | |
#### Setup BurntToast https://github.com/Windos/BurntToast | |
#### | |
#### Powershell: | |
#### | |
#### Set-ExecutionPolicy RemoteSigned -Scope CurrentUser | |
#### Install-Module -Name BurntToast | |
#### New-BTAppId | |
#### Import-Module BurntToast | |
#### Notification must Appear on: New-BurntToastNotification | |
#### | |
#### Linux Subsystem: | |
#### | |
#### Copy this file to your system | |
#### chmod +x phpunit.sh | |
#### Change EXECUTABLE to your real phpunit path | |
#### | |
#### | |
#### ~/phpunit.sh -c tests/ | |
#### | |
#### watch -n30 "~/phpunit.sh -c tests/" | |
#### | |
###################################### | |
EXECUTABLE=/mnt/d/Development/MyProject/bin/phpunit | |
COMMAND=$(echo $@ | sed -e 's/--/ /g') | |
$EXECUTABLE $@ > /dev/null | |
ec=$?; | |
if [ $ec -ne 0 ]; then | |
powershell.exe -Command "New-BurntToastNotification -Text 'PHPUnit', 'Failed (${COMMAND})'" | |
exit $ec; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment