File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -272,3 +272,27 @@ def write_with_relative_path(path):
272
272
for path in (project .root / "internal" ).rglob ("*" ):
273
273
if path .is_file ():
274
274
write_with_relative_path (path )
275
+
276
+ @staticmethod
277
+ def _get_plugin_information (project ):
278
+ module_file = project .root / "go.mod"
279
+ plugin_version = None
280
+
281
+ with open (module_file ) as f :
282
+ line = f .readline ()
283
+ while line :
284
+ if "github.com/aws-cloudformation/cloudformation-cli-go-plugin" in line :
285
+ plugin_version = line .strip ().split (" " )[- 1 ]
286
+ break
287
+ else :
288
+ line = f .readline ()
289
+
290
+ plugin_info = {"plugin-tool-version" : __version__ , "plugin-name" : "go" }
291
+
292
+ if plugin_version is not None :
293
+ plugin_info ["plugin-version" ] = plugin_version
294
+
295
+ return plugin_info
296
+
297
+ def get_plugin_information (self , project ):
298
+ return self ._get_plugin_information (project )
You can’t perform that action at this time.
0 commit comments