Trigger builds on package upload
@@ -20,12 +20,18 @@ pub const DEFAULT_DEPOT_URL: &'static str = "https://willem.habitat.sh/v1/depot"
/// Default Depot channel
pub const DEFAULT_DEPOT_CHANNEL: &'static str = "unstable";
+/// Default Depot publishing
+pub const DEFAULT_DEPOT_PUBLISH: &'static str = "false";
+
/// Default Depot URL environment variable
pub const DEPOT_URL_ENVVAR: &'static str = "HAB_DEPOT_URL";
/// Default Depot Channel environment variable
pub const DEPOT_CHANNEL_ENVVAR: &'static str = "HAB_DEPOT_CHANNEL";
+/// Default Depot Builder publishing environment variable
+pub const DEPOT_PUBLISH_ENVVAR: &'static str = "HAB_DEPOT_PUBLISH";
+
pub fn default_depot_url() -> String {
match henv::var(DEPOT_URL_ENVVAR) {
Ok(val) => val,
@@ -39,3 +45,10 @@ pub fn default_depot_channel() -> String {
Err(_) => DEFAULT_DEPOT_CHANNEL.to_string(),
}
}
+
+pub fn default_depot_publish() -> String {
+ match henv::var(DEPOT_PUBLISH_ENVVAR) {
+ Ok(val) => val,
+ Err(_) => DEFAULT_DEPOT_PUBLISH.to_string(),
+ }
+}
