cargo publish was too big (#5699)
* cargo publish too big Signed-off-by: Jess Frazelle <github@jessfraz.com> * cargo publish too big Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * bunmp again Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -22,11 +22,7 @@ pub struct Build {
|
||||
|
||||
impl Build {
|
||||
pub(crate) fn run(&self, sh: &Shell) -> Result<()> {
|
||||
let stable = sh
|
||||
.var("GITHUB_REF")
|
||||
.unwrap_or_default()
|
||||
.as_str()
|
||||
.contains("refs/tags/v");
|
||||
let stable = sh.var("GITHUB_REF").unwrap_or_default().as_str().contains("refs/tags");
|
||||
|
||||
let project_root = crate::project_root();
|
||||
let target = Target::get(&project_root);
|
||||
@ -50,7 +46,7 @@ impl Build {
|
||||
}
|
||||
|
||||
let release_tag = if stable {
|
||||
// We already checked above if the env var contains "refs/tags/v".
|
||||
// We already checked above if the env var contains "refs/tags".
|
||||
// So this is safe to unwrap.
|
||||
sh.var("GITHUB_REF")
|
||||
.unwrap_or_default()
|
||||
@ -62,10 +58,10 @@ impl Build {
|
||||
|
||||
if stable && !release_tag.contains(&version) {
|
||||
// bail early if the tag doesn't match the version
|
||||
anyhow::bail!(
|
||||
// TODO: error here when we use the tags with kcl
|
||||
println!(
|
||||
"Tag {} doesn't match version {}. Did you forget to update Cargo.toml?",
|
||||
release_tag,
|
||||
version
|
||||
release_tag, version
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user