Skip to content

Commit

Permalink
Rename the executable to gel (#1500)
Browse files Browse the repository at this point in the history
Let's see how much downstream devastation this causes.
  • Loading branch information
msullivan authored Feb 25, 2025
1 parent bdb161a commit 770ac78
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 117 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: edgedb-linux-binary
path: target/x86_64-unknown-linux-musl/debug/edgedb
path: target/x86_64-unknown-linux-musl/debug/gel

- name: Install EdgeDB
uses: edgedb/setup-edgedb@v1
Expand Down Expand Up @@ -133,10 +133,11 @@ jobs:
override: true

- run: |
cargo build --workspace --test=${{ matrix.test }} --bin edgedb --features portable_tests
cargo build --workspace --test=${{ matrix.test }} --bin gel --features portable_tests
- run: |
sudo cp target/debug/edgedb /usr/local/bin/
sudo cp target/debug/gel /usr/local/bin/gel
sudo cp target/debug/gel /usr/local/bin/edgedb
mkdir home_edgedb
sudo mv home_edgedb /Users/edgedb
Expand All @@ -155,7 +156,7 @@ jobs:
fail-fast: false
env:
_EDGEDB_WSL_DISTRO: Debian
_EDGEDB_WSL_LINUX_BINARY: ./linux-binary/edgedb
_EDGEDB_WSL_LINUX_BINARY: ./linux-binary/gel
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ authors = ["Gel Data Inc. <yo@geldata.com>"]
edition = "2018"

[[bin]]
name = "edgedb"
name = "gel"
path = "src/main.rs"

[features]
Expand Down
6 changes: 2 additions & 4 deletions tests/common/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ impl Context {
}
pub fn add_bin(self) -> anyhow::Result<Self> {
self.add_file_mode(
"edgedb",
fs::read(
env::var("EDGEDB_TEST_BIN_EXE").unwrap_or(env!("CARGO_BIN_EXE_edgedb").into()),
)?,
"gel",
fs::read(env::var("GEL_TEST_BIN_EXE").unwrap_or(env!("CARGO_BIN_EXE_gel").into()))?,
0o755,
)
}
Expand Down
3 changes: 2 additions & 1 deletion tests/docker_test_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ fn dockerfile() -> String {
--shell /bin/bash --ingroup users --gecos "Test User" \
user1
RUN mkdir /home/edgedb && chown user1 /home/edgedb
ADD ./edgedb /usr/bin/edgedb
ADD ./gel /usr/bin/edgedb
ADD ./gel /usr/bin/gel
ADD ./tests /tests
RUN chown -R user1 /tests/proj
"###
Expand Down
6 changes: 3 additions & 3 deletions tests/func/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub const BRANDING_CLI_CMD: &str = if cfg!(feature = "gel") {
};

fn edgedb_cli_cmd() -> assert_cmd::Command {
let mut cmd = Command::cargo_bin("edgedb").expect("binary found");
let mut cmd = Command::cargo_bin("gel").expect("binary found");
cmd.timeout(Duration::from_secs(60));
cmd.env("CLICOLOR", "0").arg("--no-cli-update-check");
cmd
Expand Down Expand Up @@ -127,7 +127,7 @@ impl ServerGuard {
use assert_cmd::cargo::CommandCargoExt;
use rexpect::session::spawn_command;

let mut cmd = process::Command::cargo_bin("edgedb").expect("binary found");
let mut cmd = process::Command::cargo_bin("gel").expect("binary found");
cmd.arg("--no-cli-update-check");
cmd.arg("--admin");
cmd.arg("--unix-path").arg(&self.0.info.socket_dir);
Expand All @@ -142,7 +142,7 @@ impl ServerGuard {
use assert_cmd::cargo::CommandCargoExt;
use rexpect::session::spawn_command;

let mut cmd = process::Command::cargo_bin("edgedb").expect("binary found");
let mut cmd = process::Command::cargo_bin("gel").expect("binary found");
cmd.arg("--no-cli-update-check");
cmd.arg("--admin");
cmd.arg("--unix-path").arg(&self.0.info.socket_dir);
Expand Down
2 changes: 1 addition & 1 deletion tests/func/non_interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn stdin_password() {

#[test]
fn strict_version_check() {
Command::cargo_bin("edgedb")
Command::cargo_bin("gel")
.expect("binary found")
.env("EDGEDB_RUN_VERSION_CHECK", "strict")
.arg("info")
Expand Down
10 changes: 5 additions & 5 deletions tests/github-actions/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fn github_action_install() -> anyhow::Result<()> {
.and(path(plat))
.and(path("edgedb-cli"))
.and(warp::filters::path::end())
.and(warp::fs::file(env!("CARGO_BIN_EXE_edgedb"))));
.and(warp::fs::file(env!("CARGO_BIN_EXE_gel"))));

let certs_serv = certs.clone();
let server = async {
Expand All @@ -78,8 +78,8 @@ fn github_action_install() -> anyhow::Result<()> {
std::thread::sleep(std::time::Duration::new(10, 0));

if cfg!(windows) {
fs::copy(env!("CARGO_BIN_EXE_edgedb"), "edgedb-init.exe")?;
Command::new(".\\edgedb-init.exe")
fs::copy(env!("CARGO_BIN_EXE_gel"), "gel-init.exe")?;
Command::new(".\\gel-init.exe")
.arg("-y")
.assert()
.context("edgedb-init", "self install by command name")
Expand Down Expand Up @@ -107,9 +107,9 @@ fn github_action_install() -> anyhow::Result<()> {
let bin_dir =
dirs::executable_dir().unwrap_or(dirs::data_dir().unwrap().join("edgedb").join("bin"));
let edgedb = if cfg!(windows) {
bin_dir.join("edgedb.exe")
bin_dir.join("gel.exe")
} else {
bin_dir.join("edgedb")
bin_dir.join("gel")
};

Command::new(&edgedb)
Expand Down
6 changes: 4 additions & 2 deletions tests/github-nightly/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ pub fn dock_ubuntu(codename: &str) -> String {
RUN adduser --uid 1000 --home /home/user1 \
--shell /bin/bash --ingroup users --gecos "Test User" \
user1
ADD ./edgedb /usr/bin/edgedb
ADD ./gel /usr/bin/edgedb
ADD ./gel /usr/bin/gel
ADD ./sudoers /etc/sudoers
"###,
codename = codename
Expand All @@ -62,7 +63,8 @@ pub fn dock_debian(codename: &str) -> String {
RUN adduser --uid 1000 --home /home/user1 \
--shell /bin/bash --ingroup users --gecos "Test User" \
user1
ADD ./edgedb /usr/bin/edgedb
ADD ./gel /usr/bin/edgedb
ADD ./gel /usr/bin/gel
ADD ./sudoers /etc/sudoers
"###,
codename = codename
Expand Down
Loading

0 comments on commit 770ac78

Please sign in to comment.