GToolkitLauncher Code Analysis
We have been building up a growing collection of analysis tools that we use to analyze existing code bases and steer development. The existing workflow of starting GToolkitLauncher, opening the releases view, clicking to download the latest version, and then copying and inspecting multiple Metacello invocations to load the tools and their documentation started to become annoying. We also need the same tools in many different environments and installation from scratch in a development container for each project also adds too much friction. So here are some install scripts for bash on Linux, MacOS and powershell on Windows, and a button to one-click download the latest version of GToolkit and install some analysis tools in it.
Install scripts
There is a detailed description of what the scripts do in an install-readme. It started as just a bash version of what GToolkitLauncher does itself:
- check on GitHub what the latest version of GToolkit is
- download the zip file of that for the current platform from Feenk
- unzip and install it in a well-known location.
And then I extended it try downloading first from GitHub, check the SHA256 checksum, and run the command-line GToolkit with an install script to install GToolkitLauncher.
Installing analysis tools
The command line version of GToolkit can be run with an smalltalk script. in the gt directory that GToolkitLauncher uses there is now a projects directory that contains this smalltalk script and that is lazily created when absent. It currently loads three tools after disabling change tracking and making sure the lepiter database is in a valid state. If you change its contents, it is not overwritten, so you can use it to load your own projects.
"I don''t need to track changes here, so we disable them"
EpMonitor current disable.
[
| lepiterDir props |
lepiterDir := (FileLocator imageDirectory / ''pharo-local'' / ''lepiter'') asFileReference.
lepiterDir ensureCreateDirectory.
props := LeDatabasesRegistry defaultLogicalDatabase properties.
props localFile asFileReference exists ifFalse: [ props save ].
Metacello new
repository: ''github://StephanEggermont/GtRepositoryExploration:master/src'';
baseline: ''GtRepositoryExploration'';
load.
Metacello new
repository: ''github://StephanEggermont/GtMicroPrints:main/src'';
baseline: ''GtMicroPrints'';
load.
Metacello new
repository: ''github://StephanEggermont/GitBlame:master/src'';
baseline: ''GitBlame'';
load.
#BaselineOfGtRepositoryExploration asClass loadLepiter.
#BaselineOfGtMicroPrints asClass loadLepiter.
#BaselineOfGitBlame asClass loadLepiter.
] ensure: [ EpMonitor current enable ].
BlHost pickHost universe snapshot: true andQuit: true.
Demo
One-click download of the newest release and install of MicroPrints, Repository Exploration and GitBlame