Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
3da154882d
commit
c0ae03376b
@ -5,7 +5,7 @@ use crate::{cuddle_file::CuddleFile, MainAction};
|
|||||||
|
|
||||||
pub struct CuddleReleaser {
|
pub struct CuddleReleaser {
|
||||||
client: dagger_sdk::Query,
|
client: dagger_sdk::Query,
|
||||||
env: String,
|
env: Option<String>,
|
||||||
cuddle_file: CuddleFile,
|
cuddle_file: CuddleFile,
|
||||||
|
|
||||||
folder: String,
|
folder: String,
|
||||||
@ -22,7 +22,7 @@ impl CuddleReleaser {
|
|||||||
pub async fn new(client: dagger_sdk::Query) -> eyre::Result<Self> {
|
pub async fn new(client: dagger_sdk::Query) -> eyre::Result<Self> {
|
||||||
let cuddle_file = CuddleFile::from_cuddle_file().await?;
|
let cuddle_file = CuddleFile::from_cuddle_file().await?;
|
||||||
|
|
||||||
let env = std::env::var("CUDDLE_ENV").context("CUDDLE_ENV was not set")?;
|
let env = std::env::var("CUDDLE_ENV").ok();
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
client,
|
client,
|
||||||
@ -49,7 +49,7 @@ impl MainAction for CuddleReleaser {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.env
|
.env
|
||||||
.0
|
.0
|
||||||
.get(&self.env.to_string())
|
.get(&self.env.as_ref().unwrap_or(&"prod".to_string()).to_string())
|
||||||
{
|
{
|
||||||
Some(c) => match c.clusters.first().take() {
|
Some(c) => match c.clusters.first().take() {
|
||||||
Some(c) => c,
|
Some(c) => c,
|
||||||
|
Loading…
Reference in New Issue
Block a user