Skip to content

Commit 0e1ed46

Browse files
authored
chore: Split tui into lib and bin (#947)
1 parent ca100b9 commit 0e1ed46

File tree

18 files changed

+50
-30
lines changed

18 files changed

+50
-30
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ COPY xtask/Cargo.toml /usr/src/openstack/xtask/
2222
COPY fuzz/Cargo.toml /usr/src/openstack/fuzz/
2323
RUN mkdir -p openstack/openstack_cli/src/bin && touch openstack/openstack_cli/src/lib.rs &&\
2424
cp openstack/src/main.rs openstack/openstack_cli/src/bin/osc.rs &&\
25+
mkdir -p openstack/openstack_tui/src/bin && touch openstack/openstack_tui/src/lib.rs &&\
26+
cp openstack/src/main.rs openstack/openstack_tui/src/bin/ostui.rs &&\
2527
mkdir -p openstack/openstack_sdk/src && touch openstack/openstack_sdk/src/lib.rs &&\
2628
mkdir -p openstack/structable_derive/src && touch openstack/structable_derive/src/lib.rs &&\
2729
mkdir -p /usr/src/openstack/xtask/src && touch openstack/xtask/src/lib.rs &&\
@@ -49,7 +51,7 @@ COPY . /usr/src/openstack/
4951
RUN touch openstack_sdk/src/lib.rs && touch openstack_cli/src/bin/osc.rs && touch openstack_cli/src/lib.rs && touch structable_derive/src/lib.rs
5052

5153
# This is the actual application build.
52-
RUN cargo build --target x86_64-unknown-linux-musl --release -p openstack_cli
54+
RUN cargo build --target x86_64-unknown-linux-musl --release --bin osc
5355

5456
################
5557
##### Runtime

openstack_cli/src/object_store/v1/account/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl AccountCommand {
9696
.path_segments()
9797
.expect("Object Store endpoint must not point to a bare domain")
9898
.filter(|x| !x.is_empty())
99-
.last();
99+
.next_back();
100100
if let Some(account) = account {
101101
ep_builder.account(account);
102102
}

openstack_cli/src/object_store/v1/account/show.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl AccountCommand {
8181
.path_segments()
8282
.expect("Object Store endpoint must not point to a bare domain")
8383
.filter(|x| !x.is_empty())
84-
.last();
84+
.next_back();
8585
if let Some(account) = account {
8686
ep_builder.account(account);
8787
}

openstack_cli/src/object_store/v1/container/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl ContainerCommand {
8181
.path_segments()
8282
.expect("Object Store endpoint must not point to a bare domain")
8383
.filter(|x| !x.is_empty())
84-
.last();
84+
.next_back();
8585
if let Some(account) = account {
8686
ep_builder.account(account);
8787
}

openstack_cli/src/object_store/v1/container/delete.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl ContainerCommand {
7979
.path_segments()
8080
.expect("Object Store endpoint must not point to a bare domain")
8181
.filter(|x| !x.is_empty())
82-
.last();
82+
.next_back();
8383
if let Some(account) = account {
8484
ep_builder.account(account);
8585
}

openstack_cli/src/object_store/v1/container/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl ContainersCommand {
129129
.path_segments()
130130
.expect("Object Store endpoint must not point to a bare domain")
131131
.filter(|x| !x.is_empty())
132-
.last();
132+
.next_back();
133133
if let Some(account) = account {
134134
ep_builder.account(account);
135135
}

openstack_cli/src/object_store/v1/container/prune.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl ContainerCommand {
6464
.path_segments()
6565
.expect("Object Store endpoint must not point to a bare domain")
6666
.filter(|x| !x.is_empty())
67-
.last()
67+
.next_back()
6868
.expect("Object Store endpoint must end with project id");
6969
client
7070
.object_store_container_prune_async(account, &self.container, self.prefix.as_ref())

openstack_cli/src/object_store/v1/container/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl ContainerCommand {
8080
.path_segments()
8181
.expect("Object Store endpoint must not point to a bare domain")
8282
.filter(|x| !x.is_empty())
83-
.last();
83+
.next_back();
8484
if let Some(account) = account {
8585
ep_builder.account(account);
8686
}

openstack_cli/src/object_store/v1/container/show.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl ContainerCommand {
8383
.path_segments()
8484
.expect("Object Store endpoint must not point to a bare domain")
8585
.filter(|x| !x.is_empty())
86-
.last();
86+
.next_back();
8787
if let Some(account) = account {
8888
ep_builder.account(account);
8989
}

openstack_cli/src/object_store/v1/object/delete.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl ObjectCommand {
100100
.path_segments()
101101
.expect("Object Store endpoint must not point to a bare domain")
102102
.filter(|x| !x.is_empty())
103-
.last();
103+
.next_back();
104104
if let Some(account) = account {
105105
ep_builder.account(account);
106106
}

0 commit comments

Comments
 (0)