aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-08 20:44:49 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-08 20:44:49 +0200
commit65d379f5db381423165e0da8cc788f85112873b8 (patch)
tree10b52164cc2ae5f863549305ecec97e3ab96cd80 /bin
parentfac54389550aaab8bcb4ad1e6b0b1900fd8887d2 (diff)
Add archive publishing
Diffstat (limited to 'bin')
-rwxr-xr-xbin/blog.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/blog.js b/bin/blog.js
index 3c37f47..8f0ab70 100755
--- a/bin/blog.js
+++ b/bin/blog.js
@@ -8,7 +8,7 @@ const Minimist = require('minimist');
const internals = {
blog: new Blog(Config),
- expectedKeys: ['add', 'generate', 'update', 'publish', 'version'],
+ expectedKeys: ['add', 'generate', 'update', 'publish', 'publish-archive', 'version'],
// Application entry point. Reads arguments and calls the
// corresponding method from the blog lib
@@ -47,6 +47,11 @@ const internals = {
await internals.blog.publish(value);
return;
}
+
+ if (argument === 'publish-archive') {
+ await internals.blog.publishArchive(value);
+ return;
+ }
}
}
@@ -89,7 +94,8 @@ const internals = {
console.error('blog --add path/to/blog_post\t\t(creates new blog post)');
console.error('blog --update path/to/blog_post\t\t(updates latest blog post)');
console.error('blog --generate \t\t\t(generates the blog assets)');
- console.error('blog --publish <bucket> \t\t\t\t(publishes the blog to an S3 bucket)');
+ console.error('blog --publish <bucket> \t\t(publishes the blog to an S3 bucket)');
+ console.error('blog --publish-archive <destination> \t(publishes the archive to a remote host)');
console.error('blog --version \t\t\t\t(print the version)');
}
};