Terminology (now):
- update is the process initiated by the program or user, during which the program connects to GitHub and downloads files into the Sanny Builder folder, replacing existing files.
- update can be triggered automatically (automatic update) on program startup, if the user selected this option in the update menu (in statusbar)
- update can be triggered manually by the user at any time, which involves two steps:
- checking for updates. if current mode is found to be behind upstream (a version in local JSON is lower than one in the file on GitHub), this mode is marked as ready for update. Green border turns into orange.
- downloading the update. Files are downloaded from GitHub to local folder, replacing existing copies.
Manual update only affects currently selected mode. To update another mode, user has to switch to it and then repeat the process.
Automatic update updates all modes at once.
Proposed changes.
-
eliminate the difference between automatic and manual updates. Regardless of the trigger, the tool always updates all modes (that are outdated).
- manual trigger still includes two steps: check for updates and download the update. The tool checks if any of the modes is outdated and signals it by rendering an orange border and enabling the option to download the update. The download option updates all modes, including those that are not currently selected.
-
Only update files that are explicitly marked as allowed to update. Use new attribute autoupdate="yes" to mark those files, that can be updated (either via automatic or manual trigger). In those cases where multiple elements are allowed in the same mode (e.g. ) it's up to the mode author to ensure correct use of this attribute. Example:
<mode id="sbl">
<library autoupdate="yes">sa.json"</library>
<library>other.json"</library>
<classes>classes.db</classes>
</mode>
sa.json will be updated from SBL other.json will not.
If mode extends other mode, the same rules apply
<mode extends="sbl">
<library>more.json"</library>
<classes autoupdate="yes">classes.db</classes>
</mode>
more.json will not update because it does not have autoupdate="yes" attribute. classes.db will be updated in the current mode.
Terminology (now):
Manual update only affects currently selected mode. To update another mode, user has to switch to it and then repeat the process.
Automatic update updates all modes at once.
Proposed changes.
eliminate the difference between automatic and manual updates. Regardless of the trigger, the tool always updates all modes (that are outdated).
Only update files that are explicitly marked as allowed to update. Use new attribute autoupdate="yes" to mark those files, that can be updated (either via automatic or manual trigger). In those cases where multiple elements are allowed in the same mode (e.g. ) it's up to the mode author to ensure correct use of this attribute. Example:
sa.jsonwill be updated from SBLother.jsonwill not.If mode extends other mode, the same rules apply
more.jsonwill not update because it does not haveautoupdate="yes"attribute.classes.dbwill be updated in the current mode.