aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/patches/fix_traceback_on_deploy.patch31
-rw-r--r--debian/patches/series1
2 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/fix_traceback_on_deploy.patch b/debian/patches/fix_traceback_on_deploy.patch
new file mode 100644
index 0000000..35641a9
--- /dev/null
+++ b/debian/patches/fix_traceback_on_deploy.patch
@@ -0,0 +1,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
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..36f6280
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_traceback_on_deploy.patch