Skip to content

Commit

Permalink
Issue #4: registerStonesDirectory.solo added, tested and validated
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed May 31, 2023
1 parent 73a7057 commit e9a918d
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ registerProduct.solo --registry=$registryName --fromDirectory=$GS_HOME/shared/do
# register named GemStone version using path to product tree
registerProduct.solo --registry=$registryName --productPath=/bosch1/users/dhenrich/_work/d_37x/noop50/gs/product 3.7.0

registerStonesDirectory.solo --registry=$registryName --stonesDirectory=/bosch1/users/dhenrich/_issue_4/stones

registryReport.solo
```

Expand Down
63 changes: 63 additions & 0 deletions bin/registerStonesDirectory.solo
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env superdoit_solo
options
{
SuperDoitRequiredOptionWithRequiredArg long: 'registry'.
SuperDoitRequiredOptionWithRequiredArg long: 'stonesDirectory'.
}
%
Usage
-----
USAGE $basename [--help | -h] [--debug | -D] [--debugGem] \
--registry=<registry-name> --stonesDirectory=<path-to-stones-directory>

DESCRIPTION
Register a stones directory for the named registry. If the directory does not
exist the directory is created. The stones directory is used as the default location
to create a named stone.

OPTIONS
-h, --help display usage message
-D, --debug bring up topaz debugger in the event of a script error
--debugGem If terminal is connected to stdout, bring up debugger. If not,
dump stack to stdout and wait for topaz to attach using topaz
DEBUGGEM command.

EXAMPLES
$basename --help
$basename -D
$basename --registry=bosch -stonesDirectory=/home/dhenrich/gemstone/stones
-----
%
specs
[
RwLoadSpecificationV2 {
#projectName : 'GsDevKit_stones',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Core',
'Solo'
],
#platformProperties : {
'gemstone' : {
'allusers' : {
#defaultSymbolDictName : 'Globals'
}
}
},
#comment : ''
}
]
%
doit
| registryClass stonesRegistry stonesDir stonesDirPath |
self preDoitSpecLoad: [:spec |
spec projectsHome: self dirname asFileReference parent parent].
registryClass := (self globalNamed: 'GDKRegistry').
stonesRegistry := registryClass stonesRegistryNamed: self registry.
stonesDir := self stonesDirectory asFileReference.
stonesDir ensureCreateDirectory.
stonesDirPath := GsFile serverRealPath: stonesDir pathString.
stonesRegistry stonesDirectory: stonesDirPath.
stonesRegistry export.

%
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
stonesDirectory: object
stonesDirectory := object
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
stonesDirectory
^stonesDirectory
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"commentStamp" : "",
"instvars" : [
"stones",
"stonesDirectory",
"sessions",
"productDirectory",
"projectDirectory",
Expand Down

0 comments on commit e9a918d

Please sign in to comment.