run-hooks: Handle hooks after OS upgrade on fresh install.

(cherry picked from commit fc962b8b0e)
This commit is contained in:
Alex Vandiver
2025-08-21 16:18:43 +00:00
committed by Tim Abbott
parent bffaff037e
commit 9a2194ef6c

View File

@@ -30,6 +30,10 @@ deploy_path = get_deploy_root()
if args.kind == "post-deploy":
old_dir_name = "last"
if not os.path.exists(DEPLOYMENTS_DIR + "/last"):
# Fresh installs which are doing an OS upgrade don't have a
# "last" yet
old_dir_name = "current"
else:
old_dir_name = "current"
old_version = parse_version_from(DEPLOYMENTS_DIR + "/" + old_dir_name)