Last active
January 19, 2016 17:57
-
-
Save mariusavram91/c4f3a652f6bcd0e322a2 to your computer and use it in GitHub Desktop.
sh script to check versions for all capistrano stages
This file contains hidden or 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 | |
#This goes in your devclass/classnew or devclass/classis directory | |
#To execute it: sh check_cap_versions.sh or ./check_cap_versions.sh, | |
# if you have +x mode | |
STAGES=config/deploy | |
for file in `ls -a $STAGES -I sample.rb -I vagrant.rb -I local.rb -I localhost.rb| grep \.rb$` | |
do | |
if [ -n "$file" ]; then | |
server=`cap ${file%%.*} info:sshconfig` | |
echo " | |
------$file------ $server | |
" | |
cap ${file%%.*} info:version | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment