Created
September 11, 2012 00:04
-
-
Save brain90/3694949 to your computer and use it in GitHub Desktop.
Redmine Commit Otomatis
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
#Tambahkan baris berikut pada fungsi update di issues_controller.rb | |
@issue.staging_release(params[:id],@issue.status_id) | |
# Tambahkan baris berikut sebagai fungsi publik di model issue.rb | |
# Release commit files issues to StagingServer | |
def staging_release(issue_id,status_id) | |
if status_id == 4 | |
for item in Issue.get_issues_code_path(issue_id) | |
rilis = `release.sh /var/www/MyApps#{item['path']}` | |
logger.debug “#{rilis}” | |
end | |
end | |
end | |
# Get all source code commit changes related to issues | |
def self.get_issues_code_path(issue_id) | |
results = self.connection.execute(“select DISTINCT path FROM changes WHERE | |
changeset_id IN (SELECT changeset_id FROM changesets_issues WHERE issue_id = #{issue_id})”) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment