-
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 #261: first draft of doCreateStone [ci skip]
- Loading branch information
1 parent
4ee296e
commit 011cfc3
Showing
7 changed files
with
158 additions
and
2 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...it_launcher-Core.package/AbstractGsDevKitProgram.class/class/createStone.version.args..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,11 @@ | ||
gsdevkit utilities | ||
createStone: stoneName version: gemstoneVersion args: args | ||
| commandPath | | ||
commandPath := '$GS_HOME/bin/createStone' asFileReference pathString. "Use asFileReference to resolve $GS_HOME in commandPath" | ||
self | ||
execute: commandPath , ' ' , args , ' ' stoneName , ' ' , gemstoneVersion | ||
exitStatusBlock: [ :exitStatus :stdout :stderr | | ||
exitStatus ~= 0 | ||
ifTrue: [ Error signal: 'Error , ' , stderr asString ]. | ||
self stdout nextPutAll: stdout. | ||
^ stdout ] |
10 changes: 10 additions & 0 deletions
10
.../rowan/filetree/gsdevkit_launcher-Core.package/AbstractGsDevKitProgram.class/class/ln..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,10 @@ | ||
shell utilities | ||
ln: args | ||
| cmd | | ||
cmd := '/bin/ln ' , args. | ||
self | ||
execute: cmd | ||
exitStatusBlock: [ :exitStatus :stdout :stderr | | ||
exitStatus ~= 0 | ||
ifTrue: [ Error signal: 'Error , ' , stderr asString ]. | ||
^ stdout ] |
3 changes: 3 additions & 0 deletions
3
...letree/gsdevkit_launcher-Core.package/AbstractGsDevKitProgram.class/class/startNetldi..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,3 @@ | ||
gsdevkit utilities | ||
startNetldi: stoneName | ||
^ self startNetldi: stoneName args: '' |
11 changes: 11 additions & 0 deletions
11
...e/gsdevkit_launcher-Core.package/AbstractGsDevKitProgram.class/class/startNetldi.args..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,11 @@ | ||
gsdevkit utilities | ||
startNetldi: stoneName args: startNetldiCommandLineArgs | ||
| commandPath | | ||
commandPath := '$GS_HOME/bin/startNetldi' asFileReference pathString. "Use asFileReference to resolve $GS_HOME in commandPath" | ||
self | ||
execute: commandPath , ' ' stoneName , ' ' , startNetldiCommandLineArgs | ||
exitStatusBlock: [ :exitStatus :stdout :stderr | | ||
exitStatus ~= 0 | ||
ifTrue: [ Error signal: 'Error , ' , stderr asString ]. | ||
self stdout nextPutAll: stdout. | ||
^ stdout ] |
11 changes: 11 additions & 0 deletions
11
...iletree/gsdevkit_launcher-Core.package/AbstractGsDevKitProgram.class/class/stopNetldi..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,11 @@ | ||
gsdevkit utilities | ||
stopNetldi: stoneName | ||
| commandPath | | ||
commandPath := '$GS_HOME/bin/stopNetldi' asFileReference pathString. "Use asFileReference to resolve $GS_HOME in commandPath" | ||
self | ||
execute: commandPath , ' ' stoneName | ||
exitStatusBlock: [ :exitStatus :stdout :stderr | | ||
exitStatus ~= 0 | ||
ifTrue: [ Error signal: 'Error , ' , stderr asString ]. | ||
self stdout nextPutAll: stdout. | ||
^ stdout ] |
57 changes: 56 additions & 1 deletion
57
...e/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 |
---|---|---|
@@ -1,4 +1,59 @@ | ||
actions | ||
doCreateStone | ||
" | ||
1. create GsDevKit_home stone | ||
2. update custom_stone.env and restart netldi | ||
3. populate the stone directory with usful development scripts | ||
4. run the newBuild_SystemUser_gsdevkit_launcher_tode script to build initial development stone | ||
" | ||
|
||
| createSummary stoneDir customEnv contents gsdevkitStoneScriptDir | | ||
self createStone | ||
ifFalse: [ ^ self summary ] | ||
ifFalse: [ ^ self summary ]. | ||
createSummary := Dictionary new. | ||
self summary at: #'create' put: createSummary. | ||
stoneDir := ('$GS_HOME/server/stones/' , self stoneName) asFileReference. | ||
stoneDir exists | ||
ifTrue: [ | ||
createSummary | ||
at: self stoneName | ||
put: #'skipped' -> ('stone already exists at ' , stoneDir pathString) ] | ||
ifFalse: [ | ||
self class createStone: self stoneName version: '3.5.0' args: '-g'. | ||
self createSummary | ||
at: self stoneName | ||
put: #'created' -> stoneDir pathString. | ||
customEnv := stoneDir / 'custome_stone.env'. | ||
contents := customEnv contents. | ||
customEnv | ||
writeStreamDo: [ :stream | | ||
stream | ||
nextPutAll: contents; | ||
lf; | ||
nextPutAll: 'export ROWAN_PROJECTS_HOME=$GS_HOME/shared/repos'; | ||
lf ]. | ||
self class stopNetldi: self stoneName. | ||
self class startNetldi: self stoneName. "pick up ROWAN_PROJECTS_HOME in netldi process" | ||
gsdevkitStoneScriptDir := '$GS_HOME/shared/repos/GsDefKit_launcher/bootstrapping/gemstone/gsdefkit_home' | ||
asFileReference. | ||
self | ||
ln: | ||
' -s ' | ||
, | ||
(gsdevkitStoneScriptDir / 'newBuild_SystemUser_gsdevkit_launcher_tode') | ||
pathString | ||
, ' ' , stoneDir pathString. | ||
self | ||
ln: | ||
' -s ' | ||
, | ||
(gsdevkitStoneScriptDir / 'newBuild_SystemUser_gsdevkit_launcher_deployer') | ||
pathString | ||
, ' ' , stoneDir pathString. | ||
self stdout | ||
nextPutAll: | ||
(System | ||
performOnServer: | ||
'cd ' , stoneDir pathString , '; ./newBuild_SystemUser_gsdevkit_launcher_tode'); | ||
lf ]. | ||
^ self summary |
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