Skip to content

Commit d06a52b

Browse files
bump version
1 parent b7e6f2f commit d06a52b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

scripts/create_release.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
VERSION_FILE = REPO_ROOT / "core" / "pioreactor" / "version.py"
3030
CHANGELOG_FILE = REPO_ROOT / "CHANGELOG.md"
3131
UPDATE_SCRIPTS_DIR = REPO_ROOT / "core" / "update_scripts"
32+
FE_BUILD_DIR = REPO_ROOT / "core" / "pioreactor" / "web" / "static"
3233

3334

3435
def run_git_command(args: list[str], dry_run: bool) -> None:
@@ -160,11 +161,12 @@ def stage_if_exists(path: Path, dry_run: bool) -> None:
160161
subprocess.run(["git", "add", path.as_posix()], check=True)
161162

162163

163-
def ensure_frontend_build_is_up_to_date(dry_run: bool) -> None:
164+
def ensure_frontend_build_is_up_to_date(dry_run: bool) -> bool:
164165
if dry_run:
165166
print("DRY-RUN: would run make frontend-build and verify static assets are clean")
166-
return
167+
return False
167168
subprocess.run(["make", "frontend-build"], check=True)
169+
return True
168170

169171

170172
def parse_args(argv: list[str]) -> argparse.Namespace:
@@ -191,7 +193,7 @@ def main(argv: list[str]) -> int:
191193

192194
if not args.force:
193195
ensure_clean_working_tree()
194-
ensure_frontend_build_is_up_to_date(dry_run=args.dry_run)
196+
fe_build_changed = ensure_frontend_build_is_up_to_date(dry_run=args.dry_run)
195197

196198
print(f"Preparing production release for {calver}\n")
197199

@@ -208,9 +210,11 @@ def main(argv: list[str]) -> int:
208210
stage_if_exists(CHANGELOG_FILE, dry_run=args.dry_run)
209211
if update_scripts_changed:
210212
stage_if_exists(UPDATE_SCRIPTS_DIR, dry_run=args.dry_run)
213+
if fe_build_changed:
214+
stage_if_exists(FE_BUILD_DIR, dry_run=args.dry_run)
211215

212216
need_release_commit = args.dry_run and (
213-
release_version_changed or changelog_changed or update_scripts_changed
217+
release_version_changed or changelog_changed or update_scripts_changed or fe_build_changed
214218
)
215219
if not args.dry_run:
216220
need_release_commit = git_diff_cached_has_changes()

0 commit comments

Comments
 (0)