aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnson Denen <johnson.denen@gmail.com>2017-04-09 23:32:53 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-04-09 23:32:53 -0400
commit76476584ab82707fd2431c7a46266faba9b729c2 (patch)
tree64613e6035ec2b6d30c707832b6c3e59831deb58
parentdc66e44c0f7ad6647a50e62d158dc9ed5526dbfe (diff)
Add versioning
- .version file to track - `mastodon-version' function to display
-rw-r--r--.version1
-rw-r--r--lisp/mastodon.el8
2 files changed, 9 insertions, 0 deletions
diff --git a/.version b/.version
new file mode 100644
index 0000000..6c6aa7c
--- /dev/null
+++ b/.version
@@ -0,0 +1 @@
+0.1.0 \ No newline at end of file
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index e69e10d..f44b5c7 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -25,6 +25,14 @@
(defvar mastodon--api-version "v1")
+(defun mastodon-version ()
+ "Message package version."
+ (interactive)
+ (with-temp-buffer
+ (insert-file-contents "../.version")
+ (message
+ (concat "mastodon.el v" (buffer-string)))))
+
;;;###autoload
(defun mastodon-toot ()
"Update a Mastodon instance with new toot. Content is captured in a new buffer."