diff options
| author | 2021-04-22 20:22:47 -0400 | |
|---|---|---|
| committer | 2021-04-22 20:22:47 -0400 | |
| commit | 8eeed31eb2f86ac982fa4b26f93b15828289c56d (patch) | |
| tree | 2d95f6a10afaeb9f5e25dabde5fe38de3f8458d1 /nikola/plugins/command/deploy.py | |
| parent | 3a0d66f07b112b6d2bdc2b57bbf717a89a351ce6 (diff) | |
New upstream version 8.1.3.upstream/8.1.3
Diffstat (limited to 'nikola/plugins/command/deploy.py')
| -rw-r--r-- | nikola/plugins/command/deploy.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
