hpi-swa-teaching / Gana

Merging inside Squeak
MIT License
5 stars 0 forks source link

Continous Integration + small releases #3

Open feeds opened 7 years ago

feeds commented 7 years ago

Can they be used by SWT people?

feeds commented 7 years ago

(as it came up in #19) As discussed with @bjrne we could maybe use self-update for our project (if we don't integrate our view in Squot directly). Furthermore this method is a example for the creation of a repository/working copy etc. (everything above SquotWorkingCopy registered).

SquitBrowser >> selfUpdate

selfUpdate
    "UpdateWorkingCopy := nil"
    UpdateWorkingCopy ifNil: [
        UpdateWorkingCopy := SquotWorkingCopy new.
        UpdateWorkingCopy store: SquotImageStore new.
        UpdateWorkingCopy repository: (
            SquitRepository onDirectory: FileSystem memory / 'Squot').
        UpdateWorkingCopy repository gitRepository
            addRemote: 'origin' url: self selfUpdateRepository].
    SquotWorkingCopy registered
        detect: [:each | each name includesSubstring: 'Squot' caseSensitive: false]
        "This is likely to be a Squot developer, so interactively load current version"
        ifFound: [:selfWorkingCopy | self selfUpdateWithSquot: selfWorkingCopy]
        ifNone: [
            "Close all instances before updating to avoid any UI glitches"
            SquitBrowser allInstances do: [:each | each changed: #close].
            self selfUpdateFromMetacello.
            "UpdateWorkingCopy loadVersion: UpdateWorkingCopy baseVersion interactive: false."
            SquitBrowser open].