Skip to content

Commit a4624dc

Browse files
authored
Merge pull request #8 from binlecode/issue/004-add-run-count-to-changeEntry
Issue/004 add run count to change entry
2 parents dde33ab + 6b3d827 commit a4624dc

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

mongogee/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99
}
1010

11-
version "0.7"
11+
version "0.8"
1212
group "org.grails.plugins"
1313

1414
apply plugin:"eclipse"

mongogee/grails-app/domain/grails/plugin/mongogee/ChangeEntry.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class ChangeEntry {
2020
String changeSetMethodName
2121
String changeSetId
2222
String author
23+
/** total count of runs for this change entry */
24+
Long runCount = 1L
2325

2426
static constraints = {
2527
changeSetId blank: false, unique: true

mongogee/grails-app/services/grails/plugin/mongogee/MongogeeService.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ class MongogeeService {
163163
if (changeEntry.author) {
164164
existingChangeEntry.author = changeEntry.author
165165
}
166+
existingChangeEntry.runCount += 1
166167
existingChangeEntry.save(failOnError: true, flush: true)
167168
buildChangeEntryLog(existingChangeEntry).save(failOnError: true, flush: true)
168169
}

0 commit comments

Comments
 (0)