diff --git a/README.md b/README.md index dbba0178..2877de4f 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/bin/registerStonesDirectory.solo b/bin/registerStonesDirectory.solo new file mode 100755 index 00000000..535d784a --- /dev/null +++ b/bin/registerStonesDirectory.solo @@ -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= --stonesDirectory= + +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. + +% diff --git a/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/stonesDirectory..st b/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/stonesDirectory..st new file mode 100644 index 00000000..f2859f09 --- /dev/null +++ b/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/stonesDirectory..st @@ -0,0 +1,3 @@ +accessing +stonesDirectory: object + stonesDirectory := object \ No newline at end of file diff --git a/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/stonesDirectory.st b/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/stonesDirectory.st new file mode 100644 index 00000000..3eb1246b --- /dev/null +++ b/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/stonesDirectory.st @@ -0,0 +1,3 @@ +accessing +stonesDirectory + ^stonesDirectory \ No newline at end of file diff --git a/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/properties.json b/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/properties.json index c65aad8f..2bf49ad3 100644 --- a/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/properties.json +++ b/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/properties.json @@ -7,6 +7,7 @@ "commentStamp" : "", "instvars" : [ "stones", + "stonesDirectory", "sessions", "productDirectory", "projectDirectory",