-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made commits keep track of the commit hash
- Loading branch information
Ian Ownbey
committed
Aug 8, 2008
1 parent
efefae7
commit 97e15b6
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ def export! version_number | |
puts "Version 2:" | ||
puts version.body | ||
begin | ||
export(pre_version, version) | ||
commit = export(pre_version, version) | ||
rescue | ||
Error.create({ | ||
:pre_version => pre_version, | ||
|
@@ -110,6 +110,7 @@ def export! version_number | |
self.without_versioning do | ||
version.exported = true | ||
self.raw_body = nil | ||
self.commit = commit | ||
version.save | ||
end | ||
end | ||
|
@@ -177,10 +178,10 @@ def export v1, v2 | |
git.config('user.name', v2.user.try(:login) || 'Docbox') | ||
git.config('user.email', v2.user.try(:email) || '[email protected]') | ||
commit = git.commit_all("Documentation update for #{owner.name}") | ||
self.commit = commit.split(' ')[2][0..-2] | ||
unless other_commits_pending? | ||
git.push('origin', 'docs') if Setting[:auto_push] | ||
end | ||
commit.split[2][0..-2] | ||
end | ||
|
||
def other_commits_pending? | ||
|