/
GoferCommit.class.st
48 lines (43 loc) · 1.15 KB
/
GoferCommit.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"
Commit work
"
Class {
#name : #GoferCommit,
#superclass : #GoferWorking,
#instVars : [
'message'
],
#category : #'Gofer-Core-Operations'
}
{ #category : #running }
GoferCommit >> execute [
self workingCopies
do: [ :each | self execute: each ]
]
{ #category : #running }
GoferCommit >> execute: aWorkingCopy [
| repositories version |
repositories := self gofer repositories
reject: [ :repository | (aWorkingCopy changesRelativeToRepository: repository) isEmpty ].
repositories isEmpty
ifTrue: [ ^ self ].
version := [ aWorkingCopy newVersionIn: (MCRepositoryGroup withRepositories: repositories) ]
on: MCVersionNameAndMessageRequest
do: [ :notifcation |
self message ifNil: [ message := notifcation outer last ].
notifcation resume: (Array with: notifcation suggestedName with: self message) ].
self gofer repositories
do: [ :repository | repository storeVersion: version ]
]
{ #category : #running }
GoferCommit >> initializeOn: aGofer [
super initializeOn: aGofer disablePackageCache
]
{ #category : #accessing }
GoferCommit >> message [
^ message
]
{ #category : #accessing }
GoferCommit >> message: aString [
message := aString
]