Skip to content

Commit 1a48d70

Browse files
committed
linter
1 parent 5442979 commit 1a48d70

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

scripts/release/release_on_merge.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ def run_command(cmd: List[str], dry_run: bool = False) -> bool:
4545

4646

4747
def track_release(release_type: str, version: str, status: str, context: str = ""):
48-
_releases.append({
49-
"type": release_type,
50-
"version": version,
51-
"status": status,
52-
"context": context,
53-
})
48+
_releases.append(
49+
{
50+
"type": release_type,
51+
"version": version,
52+
"status": status,
53+
"context": context,
54+
}
55+
)
5456

5557

5658
def print_summary(dry_run: bool = False):
@@ -104,7 +106,7 @@ def get_latest_om_versions_from_evergreen_yaml() -> Dict[str, str]:
104106
content = evergreen_path.read_text()
105107

106108
# Match patterns like: - &ops_manager_60_latest 6.0.27 #
107-
pattern = r'-\s*&ops_manager_(\d+)_latest\s+(\S+)\s+#'
109+
pattern = r"-\s*&ops_manager_(\d+)_latest\s+(\S+)\s+#"
108110

109111
for match in re.finditer(pattern, content):
110112
major = match.group(1) # "60", "70", "80"
@@ -118,11 +120,15 @@ def get_latest_om_versions_from_evergreen_yaml() -> Dict[str, str]:
118120
def release_agent(agent_version: str, tools_version: str, context: str, dry_run: bool = False) -> bool:
119121
"""Release an agent image."""
120122
cmd = [
121-
"python", "scripts/release/pipeline.py",
123+
"python",
124+
"scripts/release/pipeline.py",
122125
"agent",
123-
"--build-scenario", "release",
124-
"--version", agent_version,
125-
"--agent-tools-version", tools_version,
126+
"--build-scenario",
127+
"release",
128+
"--version",
129+
agent_version,
130+
"--agent-tools-version",
131+
tools_version,
126132
]
127133
success = run_command(cmd, dry_run)
128134
status = "pending" if dry_run else ("success" if success else "failed")
@@ -133,10 +139,13 @@ def release_agent(agent_version: str, tools_version: str, context: str, dry_run:
133139
def release_ops_manager(om_version: str, dry_run: bool = False) -> bool:
134140
"""Release an ops-manager image."""
135141
cmd = [
136-
"python", "scripts/release/pipeline.py",
142+
"python",
143+
"scripts/release/pipeline.py",
137144
"ops-manager",
138-
"--build-scenario", "release",
139-
"--version", om_version,
145+
"--build-scenario",
146+
"release",
147+
"--version",
148+
om_version,
140149
]
141150
success = run_command(cmd, dry_run)
142151
status = "pending" if dry_run else ("success" if success else "failed")

0 commit comments

Comments
 (0)