Skip to content

Commit

Permalink
Split CI/CD into two upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Dec 11, 2023
1 parent d9fc3ac commit 635aff7
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1112,14 +1112,13 @@ generate_upgrade_list!(
..default()
},

CiCd: Upgrade {
name: "CI/CD".to_string(),
ContinuousIntegration: Upgrade {
name: "Continuous Integration".to_string(),
desc: "Reduces all future technical debt increases by 10%.".to_string(),
tech_debt: 0.5,
base_cost: 500.0,
cost_scale_factor: 1.2,
weight: 1.0,
remaining: 2,
installed_min: vec![(Rtfm, 2), (UnitTests, 1)],
install: Some(world.register_system(|mut upgrade_list: ResMut<UpgradeList>| {
for upgrade in &mut upgrade_list.0 {
Expand All @@ -1131,6 +1130,24 @@ generate_upgrade_list!(
..default()
},

ContinuousDeployment: Upgrade {
name: "Continuous Deployment".to_string(),
desc: "Reduces all future technical debt increases by 10%.".to_string(),
tech_debt: 0.5,
base_cost: 1000.0,
cost_scale_factor: 1.2,
weight: 1.0,
installed_min: vec![(ContinuousIntegration, 1)],
install: Some(world.register_system(|mut upgrade_list: ResMut<UpgradeList>| {
for upgrade in &mut upgrade_list.0 {
if upgrade.tech_debt > 0.0 {
upgrade.tech_debt *= 0.9;
}
}
})),
..default()
},

// Slots (immediate)

Brainstorm: Upgrade {
Expand Down

0 comments on commit 635aff7

Please sign in to comment.