-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integrated into mantid startup for release builds
Also added docs, and neatened things up a bit. Improved handling of if-modified-since returns. re #12064
- Loading branch information
1 parent
9c99ecf
commit f2f8fef
Showing
6 changed files
with
115 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
Code/Mantid/docs/source/algorithms/CheckMantidVersion-v1.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
.. algorithm:: | ||
|
||
.. summary:: | ||
|
||
.. alias:: | ||
|
||
.. properties:: | ||
|
||
Description | ||
----------- | ||
|
||
Checks if a new release of Mantid is available using the Github API for inspecting the most recent release. | ||
In order to reduce API usage and optimise performance the request is sent with a "if-modified-since" header | ||
with the date of the current release. | ||
|
||
This algorithm is run on asynchronously on start-up in release builds and official releases of Mantid. | ||
It only outputs messages to the logs and outpus properties, it does not change anything else. | ||
|
||
If you want to disable the check on start-up add this to your mantid.user.properties file. | ||
|
||
``` | ||
CheckMantidVersion.OnStartup = 0 | ||
``` | ||
|
||
Usage | ||
----- | ||
|
||
**Example - CheckMantidVersion** | ||
|
||
.. testcode:: CheckMantidVersionExample | ||
|
||
(current_version, most_recent_version, is_new_version_available)=CheckMantidVersion() | ||
print "Current Version: " + current_version | ||
print "Most Recent Version: " + most_recent_version | ||
print "Is a newer version available? " + str(is_new_version_available) | ||
|
||
Output: | ||
|
||
.. testoutput:: CheckMantidVersionExample | ||
:options: +ELLIPSIS, +NORMALIZE_WHITESPACE | ||
|
||
Current Version: ... | ||
Most Recent Version: ... | ||
Is a newer version available? ... | ||
|
||
|
||
.. categories:: | ||
|