Created
April 27, 2010 13:59
-
-
Save rngtng/380749 to your computer and use it in GitHub Desktop.
skype hotdeploy apple script
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
#display dialog (do shell script "cd /Users/tobiasb/Sites/qype_admin && pwd") | |
my hotdeploy() | |
on adding folder items to this_folder after receiving these_items | |
my hotdeploy() | |
end adding folder items to | |
on hotdeploy() | |
set usr_home to "/Users/tobiasb/" | |
set prj_folder to usr_home & "Sites/qype_admin/" | |
set filename to "report_queries.yml" | |
set srcs to usr_home & "Downloads/" & filename | |
set dest to prj_folder & "config/" & filename | |
try | |
tell application "Finder" to set file_exists to exists srcs as POSIX file | |
if file_exists then | |
say "here we go" | |
do shell script "mv " & srcs & " " & dest | |
set diff to do shell script "/opt/local/bin/svn diff " & dest | |
if not diff is equal to "" then | |
#set commit to "/opt/local/bin/svn ci --quiet -m'SkypeAutoCommiter: updated report queries' " & dest & ";" | |
#set hotdeploy to "cd " & prj_folder & "; /usr/bin/cap production qype:hotdeploy FILES=config/" & filename & ";" | |
#set out to commit & hotdeploy | |
set out to do shell script "/Users/tobiasb/bin/update_report_queries.sh" | |
# /opt/local/bin/svn ci -m'SkypeAutoCommiter: updated report queries' /Users/tobiasb/Sites/qype-admin/config/report_queries.yml | |
# cd /Users/tobiasb/Sites/qype-admin/ | |
#/usr/bin/cap production qype:hotdeploy FILES=config/report_queries.yml | |
my message("done") | |
say "done" | |
else | |
my message("no changes") | |
end if | |
else | |
return "no file" | |
end if | |
on error the error_message number the error_number | |
my message("error") | |
say "error" | |
set the error_text to "Error: " & the error_number & ". " & the error_message | |
display dialog the error_text buttons {"OK"} default button 1 | |
return the error_text | |
end try | |
end hotdeploy | |
on message(msg) | |
tell application "Skype" to send command "MESSAGE justalii SkypeAutoCommiter: " & msg script name "to Alli" | |
#say msg | |
end message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment