blob: 35641a9572335d4e203d7b8598281379278be9f6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 0e47daeb30a59ecabce2a6ee8b7d50aae48a8c16 Mon Sep 17 00:00:00 2001
From: Harshad Sharma <harshad@sharma.io>
Date: Thu, 3 Dec 2020 01:13:59 +0530
Subject: [PATCH] fixes #3479
---
nikola/plugins/command/deploy.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/nikola/plugins/command/deploy.py b/nikola/plugins/command/deploy.py
index 5273b58dd..11a0c9bf1 100644
--- a/nikola/plugins/command/deploy.py
+++ b/nikola/plugins/command/deploy.py
@@ -54,6 +54,8 @@ def _execute(self, command, args):
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 @@ def _execute(self, command, args):
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
|