Skip to content

A way to automatically notify (with a sound) a group of people in the same room that a new commit has been pushed to repository. Includes a Git hook and scripts.

Notifications You must be signed in to change notification settings

charn/Soundrepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

***************************************************
* Playing a sound when a new commit has been made *
***************************************************

1. Get some sound files
2. Set-up git-sound-effect.rb
3. Clone the repository that you want to monitor for commits
4. Set-up a Git post-merge hook
5. Set-up update-soundrepo.sh that will do the git pull for you
6. Edit crontab to run the update-soundrepo.sh every 30 seconds.

***********************
* git-sound-effect.rb *
***********************

#!/usr/bin/ruby
sounds = ["~/git-commit-sound-1.wav",
	"~/git-commit-sound-2.wav"]
chosen = sounds[rand(sounds.size)]
%x[ play #{chosen} > /dev/null 2>&1 ]

***********************
* Git post-merge hook *
***********************

#!/bin/sh
# echo "POST MERGE"

# Play sound if new stuff comes in
~/git-sound-effect.rb

***********************
* update-soundrepo.sh *
***********************

#!/bin/sh
export GIT_SSL_NO_VERIFY=true
cd ~/soundrepo
git pull > /dev/null 2>&1

***********
* Crontab *
***********

# m h  dom mon dow   command
* * * * * sleep 30; ~/update-soundrepo.sh
* * * * * ~/update-soundrepo.sh

About

A way to automatically notify (with a sound) a group of people in the same room that a new commit has been pushed to repository. Includes a Git hook and scripts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published