aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-08 13:54:21 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-08 13:54:21 +0200
commitfac54389550aaab8bcb4ad1e6b0b1900fd8887d2 (patch)
treea1a85902a90a0c542438bb22e5844d9b92069a4a /bin
parent1ac49bad28800a79b25c1e22112e71018901d3ba (diff)
Add rudimentary gemlog archive support
Diffstat (limited to 'bin')
-rwxr-xr-xbin/blog.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/blog.js b/bin/blog.js
index 7864f9b..3c37f47 100755
--- a/bin/blog.js
+++ b/bin/blog.js
@@ -1,13 +1,14 @@
#!/usr/bin/env node
'use strict';
+const Package = require('../package.json');
const Config = require('../config/config');
const Blog = require('..');
const Minimist = require('minimist');
const internals = {
blog: new Blog(Config),
- expectedKeys: ['add', 'generate', 'update', 'publish'],
+ expectedKeys: ['add', 'generate', 'update', 'publish', 'version'],
// Application entry point. Reads arguments and calls the
// corresponding method from the blog lib
@@ -22,6 +23,11 @@ const internals = {
const value = parsedArguments[argument];
+ if (argument === 'version') {
+ console.log(Package.version);
+ return;
+ }
+
if (argument === 'add') {
await internals.blog.add(value);
return;
@@ -83,7 +89,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 \t\t\t\t(publishes the blog)');
+ console.error('blog --publish <bucket> \t\t\t\t(publishes the blog to an S3 bucket)');
+ console.error('blog --version \t\t\t\t(print the version)');
}
};