Skip to content

Commit

Permalink
Cluster chart version (#587)
Browse files Browse the repository at this point in the history
* Make cluster use top-level VERSION

* Trim newlines from VERSION const in fluvio-cluster

* Put VERSION behind 'platform' flag. Bump version
  • Loading branch information
nicholastmosher authored Dec 21, 2020
1 parent abfafa9 commit 6b4894c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 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.

3 changes: 2 additions & 1 deletion src/cluster/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fluvio-cluster"
version = "0.4.1"
version = "0.4.2"
edition = "2018"
license = "Apache-2.0"
authors = ["Fluvio Contributors <[email protected]>"]
Expand All @@ -24,6 +24,7 @@ cli = [
"prettytable-rs",
"fluvio-runner-local/platform",
]
platform = []

[dependencies]
colored = "2.0.0"
Expand Down
1 change: 0 additions & 1 deletion src/cluster/src/VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion src/cluster/src/cli/start/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct DefaultVersion(String);

impl Default for DefaultVersion {
fn default() -> Self {
Self(crate::VERSION.to_string())
Self(crate::VERSION.trim().to_string())
}
}

Expand Down
7 changes: 6 additions & 1 deletion src/cluster/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ pub use check::{ClusterChecker, CheckStatus, CheckStatuses};
pub use check::{RecoverableCheck, UnrecoverableCheck};
pub use delete::ClusterUninstaller;

const VERSION: &str = include_str!("VERSION");
#[cfg(feature = "platform")]
const VERSION: &str = include_str!("../../../VERSION");

#[cfg(not(feature = "platform"))]
const VERSION: &str = "UNDEFINED";

pub(crate) const DEFAULT_NAMESPACE: &str = "default";
pub(crate) const DEFAULT_HELM_VERSION: &str = "3.3.4";
pub(crate) const DEFAULT_CHART_SYS_REPO: &str = "fluvio-sys";
Expand Down
2 changes: 1 addition & 1 deletion src/cluster/src/start/k8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ impl ClusterInstaller {
namespace: DEFAULT_NAMESPACE.to_string(),
image_tag: None,
image_registry: DEFAULT_REGISTRY.to_string(),
chart_version: crate::VERSION.to_string(),
chart_version: crate::VERSION.trim().to_string(),
chart_name: DEFAULT_CHART_APP_NAME.to_string(),
chart_location: ChartLocation::Remote(DEFAULT_CHART_REMOTE.to_string()),
group_name: DEFAULT_GROUP_NAME.to_string(),
Expand Down

0 comments on commit 6b4894c

Please sign in to comment.