MCVersionInfo.st
branchjv
changeset 1164 b2f0322f5c53
parent 1109 4aad118c1257
child 1175 194ac10b8ec3
--- a/MCVersionInfo.st	Fri Sep 02 22:20:43 2022 +0100
+++ b/MCVersionInfo.st	Tue Sep 20 17:58:07 2022 +0100
@@ -1,5 +1,6 @@
 "
 COPYRIGHT (c) 2020 LabWare
+COPYRIGHT (c) 2022 LabWare
 "
 "{ Package: 'stx:goodies/monticello' }"
 
@@ -20,6 +21,7 @@
 copyright
 "
 COPYRIGHT (c) 2020 LabWare
+COPYRIGHT (c) 2022 LabWare
 
 
 "
@@ -27,10 +29,13 @@
 
 !MCVersionInfo class methodsFor:'instance creation'!
 
-forPackage: package 
+forPackage: package
+    "Return an MCVersionInfo for currently loaded (Smalltalk/X) package"                
+
     ^ self new initializeWithPackage: package
 
     "Created: / 05-08-2020 / 15:34:49 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified (comment): / 19-09-2022 / 19:45:18 / Jan Vrany <jan.vrany@labware.com>"
 ! !
 
 !MCVersionInfo class methodsFor:'as yet unclassified'!
@@ -220,7 +225,14 @@
 !
 
 initializeWithPackage: aSymbol
-    name := aSymbol.
+    | pkgDef |
+
+    pkgDef := ProjectDefinition definitionClassForPackage: aSymbol.
+    pkgDef notNil ifTrue: [ 
+        name := pkgDef monticelloPackageName ? aSymbol
+    ] ifFalse: [ 
+        name := aSymbol
+    ].
     id := UUID fromBytes: (SHA1Stream hashValueOf: name).
     message := '<no message>'.
     date := Date today.
@@ -230,6 +242,7 @@
     stepChildren := nil.
 
     "Created: / 05-08-2020 / 15:37:28 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified: / 19-09-2022 / 19:50:34 / Jan Vrany <jan.vrany@labware.com>"
 ! !
 
 !MCVersionInfo methodsFor:'pillaging'!