-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install new executable name (and link old executable) (#1398)
This installs (when --features gel is passed) to both edgedb and gel executables. The alternative executable is hard linked, symlinked or copied (in that order of preference). Note that the gel executable is installed even w/o --features gel right now, but it is installed as the "alternate" executable. We also check the name of the executable that is invoked and warn if the alternative is there. If the two executables are out of sync (determined by checking executable length), we warn as well.
- Loading branch information
Showing
4 changed files
with
165 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,44 @@ | ||
#![allow(unused)] | ||
use const_format::concatcp; | ||
|
||
pub const BRANDING: &str = "EdgeDB"; | ||
pub const BRANDING_CLI: &str = "EdgeDB CLI"; | ||
pub const BRANDING_CLOUD: &str = "EdgeDB Cloud"; | ||
pub const BRANDING_CLI_CMD: &str = "edgedb"; | ||
/// The product name. | ||
pub const BRANDING: &str = if cfg!(feature = "gel") { | ||
"Gel" | ||
} else { | ||
"EdgeDB" | ||
}; | ||
/// The CLI name. | ||
pub const BRANDING_CLI: &str = concatcp!(BRANDING, " CLI"); | ||
/// The cloud name. | ||
pub const BRANDING_CLOUD: &str = concatcp!(BRANDING, " Cloud"); | ||
|
||
/// The CLI command name. | ||
pub const BRANDING_CLI_CMD: &str = if cfg!(feature = "gel") { | ||
"gel" | ||
} else { | ||
"edgedb" | ||
}; | ||
/// The CLI command name for the alternative executable. | ||
pub const BRANDING_CLI_CMD_ALT: &str = if cfg!(feature = "gel") { | ||
"edgedb" | ||
} else { | ||
"gel" | ||
}; | ||
/// The executable file name for the CLI. | ||
pub const BRANDING_CLI_CMD_FILE: &str = if cfg!(windows) { | ||
concatcp!(BRANDING_CLI_CMD, ".exe") | ||
} else { | ||
BRANDING_CLI_CMD | ||
}; | ||
/// The executable file name for the CLI alternative. | ||
pub const BRANDING_CLI_CMD_ALT_FILE: &str = if cfg!(windows) { | ||
concatcp!(BRANDING_CLI_CMD_ALT, ".exe") | ||
} else { | ||
BRANDING_CLI_CMD_ALT | ||
}; | ||
|
||
/// The WSL distribution name. | ||
pub const BRANDING_WSL: &str = "EdgeDB.WSL.1"; | ||
|
||
/// The display name for the configuration file. | ||
pub const CONFIG_FILE_DISPLAY_NAME: &str = "`gel.toml` (or `edgedb.toml`)"; |
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