Skip to content

Commit 183ca39

Browse files
committed
fix logic bugs
1 parent 66bf016 commit 183ca39

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.cargo/config.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[alias]
22
xtask = ["run", "-p", "xtask", "--"]
3-
cross-dev = ["xtask"]
43
build-docker-image = ["xtask", "build-docker-image"]

xtask/src/build_docker_image.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub fn build_docker_image(
104104

105105
if ["staging", "trying"]
106106
.iter()
107-
.any(|branch| branch == &ref_name)
107+
.any(|branch| branch != &ref_name)
108108
{
109109
tags.push(format!("{image_name}:edge"));
110110
}
@@ -159,7 +159,7 @@ pub fn build_docker_image(
159159
println!("::set-output name=image::{}", &tags[0])
160160
}
161161
}
162-
if (std::env::var("GITHUB_ACTIONS").is_ok() || !force) && push {
162+
if !(std::env::var("GITHUB_ACTIONS").is_ok() || !push || force) {
163163
panic!("refusing to push, use --force to override");
164164
}
165165
Ok(())

0 commit comments

Comments
 (0)