From 8eeed31eb2f86ac982fa4b26f93b15828289c56d Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Thu, 22 Apr 2021 20:22:47 -0400 Subject: New upstream version 8.1.3. --- nikola/plugins/command/deploy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nikola/plugins/command/deploy.py') diff --git a/nikola/plugins/command/deploy.py b/nikola/plugins/command/deploy.py index 5273b58..64c1c9f 100644 --- a/nikola/plugins/command/deploy.py +++ b/nikola/plugins/command/deploy.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright © 2012-2020 Roberto Alsina and others. +# Copyright © 2012-2021 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated @@ -54,6 +54,8 @@ class CommandDeploy(Command): if last_deploy is not None: last_deploy = dateutil.parser.parse(last_deploy) clean = False + else: + clean = True if self.site.config['COMMENT_SYSTEM'] and self.site.config['COMMENT_SYSTEM_ID'] == 'nikolademo': self.logger.warning("\nWARNING WARNING WARNING WARNING\n" @@ -96,6 +98,8 @@ class CommandDeploy(Command): self.logger.info("Successful deployment") new_deploy = datetime.utcnow() + if last_deploy is None: + last_deploy = new_deploy self._emit_deploy_event(last_deploy, new_deploy, clean, undeployed_posts) # Store timestamp of successful deployment -- cgit v1.2.3