-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathlib.rs
59 lines (50 loc) · 1.53 KB
/
lib.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use anyhow::Context;
pub mod cli;
pub mod command_add;
pub mod command_api;
pub mod command_completions;
pub mod command_config_backgroundselfupdate;
pub mod command_config_modifypath;
pub mod command_config_startupselfupdate;
pub mod command_config_symlinks;
pub mod command_config_versionsdbupdate;
pub mod command_default;
pub mod command_gc;
pub mod command_info;
pub mod command_initial_setup_from_launcher;
pub mod command_link;
pub mod command_list;
pub mod command_override;
pub mod command_remove;
pub mod command_selfchannel;
pub mod command_selfuninstall;
pub mod command_selfupdate;
pub mod command_status;
pub mod command_update;
pub mod command_update_version_db;
pub mod config_file;
pub mod global_paths;
pub mod jsonstructs_versionsdb;
pub mod operations;
pub mod utils;
pub mod versions_file;
include!(concat!(env!("OUT_DIR"), "/bundled_version.rs"));
include!(concat!(env!("OUT_DIR"), "/various_constants.rs"));
include!(concat!(env!("OUT_DIR"), "/built.rs"));
pub fn get_bundled_julia_version() -> &'static str {
BUNDLED_JULIA_VERSION
}
pub fn get_bundled_dbversion() -> anyhow::Result<semver::Version> {
let dbversion = semver::Version::parse(BUNDLED_DB_VERSION)
.with_context(|| "Failed to parse our own db version.")?;
Ok(dbversion)
}
pub fn get_juliaup_target() -> &'static str {
JULIAUP_TARGET
}
pub fn get_own_version() -> anyhow::Result<semver::Version> {
use semver::Version;
let version =
Version::parse(PKG_VERSION).with_context(|| "Failed to parse our own version.")?;
Ok(version)
}