Skip to content

Commit

Permalink
feat: respect tags for all publishing scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
loispostula committed May 17, 2024
1 parent ffb69f2 commit 8801f23
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-fslabscli"
version = "1.2.2"
version = "1.3.0"
edition = "2021"
authors = ["FSLABS DevOps Gods"]
repository = "https://github.com/ForesightMiningSoftwareCorporation/fslabsci"
Expand Down
11 changes: 8 additions & 3 deletions src/commands/check_workspace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,14 @@ pub async fn check_workspace(
if let Ok(env_string) = std::env::var("GITHUB_REF") {
// Regarding installer and launcher, we need to check the tag of their counterpart
if env_string.starts_with("refs/tags") {
if package_key.ends_with("_launcher") || package_key.ends_with("_installer")
{
} else {
let mut check_key = package_key.clone();
if package_key.ends_with("_launcher") {
check_key = check_key.replace("_launcher", "");
}
if package_key.ends_with("_installer") {
check_key = check_key.replace("_installer", "");
}
if !env_string.starts_with(&format!("refs/tags/{}", check_key)) {
package.publish = false;
}
}
Expand Down

0 comments on commit 8801f23

Please sign in to comment.