Hi,
I'm currently working on a bash script to automatically update rust and oxide every time a new update is available.
I want to ensure that rust and oxide have both been updated to the same version before trigerring the update.
For this, I need to check if last oxide release is made for last available rust update. I know I can easily get a build ID from rust server (current id being 1507290) but I don't know how to get any useful information about version in the oxide zip.
Thank you for help
Automatic version check
Discussion in 'Rust Development' started by DrEmixam, Dec 12, 2016.
-
Wulf Community Admin
Have you taken a look at Smooth Restarter for Rust | Oxide ? Is has options for restarting to handle updates.
-
seems interesting, I'll take a look.
I'm a bit afraid Oxide version could be the wrong one and won't load.
Is there any way to prevent rust server to start if oxide does not load correctly ? -
OK, so, I took smooth restarter as an example to code my updater, this works well but I still need a way to prevent Rust to start if Oxide fails to load. Any ideas ?
-
Wulf Community Admin
-
Your current Oxide version can be read out by this:
Code:int serverOxideVersion = Convert.ToInt32(Oxide.Core.OxideMod.Version.Patch);
Code:https://api.github.com/repos/OxideMod/Snapshots/commits
Code:Dictionary<string, string> userAgent = new Dictionary<string, string>(); userAgent.Add("User-Agent", "OxideMod");
The latest commit does for example look like that, which represents the LATEST BUILD:
Code:{ "sha": "1566196e55e7b1e1777e4286eb86c19a748185f9", "commit": { "author": { "name": "Travis", "email": "[email protected]", "date": "2016-12-12T21:56:10Z" }, "committer": { "name": "Travis", "email": "[email protected]", "date": "2016-12-12T21:56:10Z" }, "message": "Oxide build 2814 from https://github.com/OxideMod/Oxide/commit/d0159e4", "tree": { "sha": "06095aeb28a5e34ca196bdf92a0e98e67125439b", "url": "https://api.github.com/repos/OxideMod/Snapshots/git/trees/06095aeb28a5e34ca196bdf92a0e98e67125439b" }, "url": "https://api.github.com/repos/OxideMod/Snapshots/git/commits/1566196e55e7b1e1777e4286eb86c19a748185f9", "comment_count": 0 }, "url": "https://api.github.com/repos/OxideMod/Snapshots/commits/1566196e55e7b1e1777e4286eb86c19a748185f9", "html_url": "https://github.com/OxideMod/Snapshots/commit/1566196e55e7b1e1777e4286eb86c19a748185f9", "comments_url": "https://api.github.com/repos/OxideMod/Snapshots/commits/1566196e55e7b1e1777e4286eb86c19a748185f9/comments", "author": null, "committer": null, "parents": [ { "sha": "57709872bc031826728d5d5da6e33ec7e9769a3a", "url": "https://api.github.com/repos/OxideMod/Snapshots/commits/57709872bc031826728d5d5da6e33ec7e9769a3a", "html_url": "https://github.com/OxideMod/Snapshots/commit/57709872bc031826728d5d5da6e33ec7e9769a3a" } ] }