From 7b5ab44e47b0ce360f928bb581a0de85bc0cdcf6 Mon Sep 17 00:00:00 2001 From: "Esteban A. Maringolo" Date: Mon, 6 Apr 2020 12:34:57 -0300 Subject: [PATCH] Updates docs --- docs/configmaps.md | 13 +++++++++++-- docs/strategies.md | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/configmaps.md b/docs/configmaps.md index 87f1631..40d93c1 100644 --- a/docs/configmaps.md +++ b/docs/configmaps.md @@ -67,7 +67,16 @@ This will produce the a `.configmaps` file with the following STON content: ] ``` -**NOTE:** In order to write Applications to disk, such applications must be loaded in the image first. So if your writing a Configuration Map to disk, it is recommended you load the config map first. +### Autoloading + +If you attempt to write a Configuration Map that isn't loaded in the image, by default `TonelWriter` will attempt to load it first (and its required maps). + +If you want to disable this behavior, you can do it by evaluating: +```smalltalk +aTonelWriter autoLoad: false +``` + +With the autoloading disabled, if you attempt to write a Configuration Map, an exception will be raised. ## Loading Configuration Maps from disk @@ -86,4 +95,4 @@ loader loadAllMapsWithRequiredMaps. When loading a Configuration Map the _TonelLoader_ will first search for any matching version in the Tonel repository and if not found then it will search it up in the ENVY Library. If no version is found in neither of these, and error will be thrown. -All applications of the Configuration Map read from disk are expected to be in the Tonel repository as well, so there is currently no way to load just the configuration map from disk and the version from the EM Library. \ No newline at end of file +All applications of the Configuration Map read from disk are expected to be in the Tonel repository as well, so there is currently no way to load just the configuration map from disk and the applications from the EM Library. \ No newline at end of file diff --git a/docs/strategies.md b/docs/strategies.md index 89a473f..33aa212 100644 --- a/docs/strategies.md +++ b/docs/strategies.md @@ -114,8 +114,13 @@ This will automatically select the latest (newest) edition as the base edition f aTonelLoader useLatestBaseEditions ``` +### `TonelLoaderGitParentBaseEditionStrategy` (unattended) +In git repositories, each commit has one or more parent commits, this strategy will try to find a base edition whose versionName matches the parent commit hash (only its first eight characters), and if no edition is found, it will choose the latest one, as in `TonelLoaderlatestBaseEditionStrategy`. +When setting `useGitVersion` in the `TonelLoader`, this base edition strategy will be set as well. + +So if you're loading `MyApplication` from a git repository whose commit id is `8c3fa3d` and parent commit is `b78df32`, when loading a base edition it will look for an edition of `MyApplication` in the EM Library whose `versionName` match `b78df32`. # Common cases recipes