-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #260: flesh out the doClone code for install_launcher.st [ci skip]
- Loading branch information
1 parent
e5e8a4c
commit 52cb462
Showing
9 changed files
with
186 additions
and
20 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
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
17 changes: 17 additions & 0 deletions
17
...devkit_launcher-Scripts.package/GdkL_Install_Launcher.class/class/repositoryCloneSpecs.st
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
accessing | ||
repositoryCloneSpecs | ||
^ {(Dictionary new | ||
at: 'remoteUrl' put: 'https://github.com/GemTalk/Rowan.git'; | ||
at: 'repositoryDirName' put: 'Rowan'; | ||
at: 'committish' put: 'gsdevkit_launcher'; | ||
yourself). | ||
(Dictionary new | ||
at: 'remoteUrl' put: 'https://github.com/dalehenrich/st_launcher.git'; | ||
at: 'repositoryDirName' put: 'st_launcher'; | ||
at: 'committish' put: 'candidateV0.2'; | ||
yourself). | ||
(Dictionary new | ||
at: 'remoteUrl' put: 'https://github.com/dalehenrich/stash.git'; | ||
at: 'repositoryDirName' put: 'stash'; | ||
at: 'committish' put: 'candidateV0.1'; | ||
yourself)} |
34 changes: 34 additions & 0 deletions
34
...wan/src/gsdevkit_launcher-Scripts.package/GdkL_Install_Launcher.class/instance/doClone.st
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
actions | ||
doClone | ||
| gitTool repositoryRoot | | ||
self clone | ||
ifFalse: [ ^ self summary ]. | ||
gitTool := Rowan gitTools. | ||
repositoryRoot := '$GS_HOME/shared/repos' asFileReference. | ||
self summary at: #'clone' put: Dictionary new. | ||
self class repositoryCloneSpecs | ||
do: [ :specDict | | ||
| repositoryName repositoryDirectory committish | | ||
repositoryName := specDict at: 'repositoryDirName'. | ||
repositoryDirectory := repositoryRoot / repositoryName. | ||
repositoryDirectory exists | ||
ifTrue: [ | ||
(self summary at: #'clone') | ||
at: repositoryName | ||
put: | ||
#'skipped' | ||
-> | ||
('git repository already exists at ' | ||
, repositoryDirectory pathString printString) ] | ||
ifFalse: [ | ||
gitTool | ||
gitcloneIn: repositoryRoot pathString | ||
with: | ||
' --no-checkout ' , (specDict at: 'remoteUrl') , ' ' | ||
, repositoryDirectory pathString. | ||
committish := specDict at: 'committish'. | ||
gitTool gitcheckoutIn: repositoryDirectory pathString with: committish. | ||
(self summary at: #'clone') | ||
at: repositoryName | ||
put: | ||
#'cloned' -> (repositoryDirectory pathString , ':' , committish) ] ] |
4 changes: 4 additions & 0 deletions
4
...c/gsdevkit_launcher-Scripts.package/GdkL_Install_Launcher.class/instance/doCreateStone.st
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
actions | ||
doCreateStone | ||
self createStone | ||
ifFalse: [ ^ self summary ] |
23 changes: 16 additions & 7 deletions
23
.../rowan/src/gsdevkit_launcher-Scripts.package/GdkL_Install_Launcher.class/instance/main.st
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 |
---|---|---|
@@ -1,9 +1,18 @@ | ||
main | ||
main | ||
self stderr | ||
nextPutAll: 'clone :: ' , self clone printString; | ||
lf; | ||
nextPutAll: 'createStone :: ' , self createStone printString. | ||
self createStone | ||
ifTrue: [ self stderr nextPutAll: ' -- '; nextPutAll: self stoneName ]. | ||
self stderr lf | ||
false | ||
ifTrue: [ | ||
self stderr | ||
nextPutAll: 'clone :: ' , self clone printString; | ||
lf; | ||
nextPutAll: 'createStone :: ' , self createStone printString. | ||
self createStone | ||
ifTrue: [ | ||
self stderr | ||
nextPutAll: ' -- '; | ||
nextPutAll: self stoneName ]. | ||
self stderr lf ]. | ||
self | ||
doClone; | ||
doCreateStone. | ||
^ self summary |
8 changes: 8 additions & 0 deletions
8
...wan/src/gsdevkit_launcher-Scripts.package/GdkL_Install_Launcher.class/instance/summary.st
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
actions | ||
summary | ||
^ summary | ||
ifNil: [ | ||
summary := Dictionary new | ||
at: #'clone' put: #'skipped' -> 'no --clone option specified'; | ||
at: #'createStone' put: #'skipped' -> 'no --create option specified'; | ||
yourself ] |
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
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