Permalink
Browse files

feature branch

  • Loading branch information...
NorthIsUp committed Dec 27, 2011
1 parent 23d87e5 commit 2b737cd27b58e39da6f54804305b3a59a778484a
Showing with 50 additions and 7 deletions.
  1. +2 −1 Default.sublime-keymap
  2. +17 −0 Sublimation.py
  3. +31 −6 support/pavement.py
View
@@ -1,3 +1,4 @@
[
- { "keys": ["alt+s"], "command": "block_select" }
+ { "keys": ["alt+s"], "command": "block_select" },
+ { "keys": ["alt+c"], "command": "update_api_doc" }
]
View
@@ -1,7 +1,24 @@
+import sublime
+sublime.log_commands(True)
+
import sublime_plugin
from sublimation import block_select
+from sublimation import json_plist_toggle
+from sublimation import update_api_docs
class BlockSelectCommand(sublime_plugin.TextCommand):
def run(self, edit):
block_select.block_select(self, edit)
+
+
+class JsonPlistToggleCommand(sublime_plugin.TextCommand):
+ def run(self, edit):
+ json_plist_toggle.json_plist_toggle(self, edit)
+
+
+class UpdateApiDoc(sublime_plugin.TextCommand):
+ def run(self, edit):
+ print "running"
+
+ update_api_docs.update_api_docs(self)
View
@@ -1,9 +1,9 @@
+import os
from paver.easy import *
from paver.setuputils import setup
-try:
- import simplejson as json
-except Exception, e:
- import json
+import simplejson as json
+
+sublimation_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
setup(
name="Sublimation",
@@ -43,15 +43,40 @@ def html():
@task
def bump_rev():
"""Bump the revision as a part of distribution"""
- metadata_file = path("../package-metadata.json")
+ version = sh("git reflog --all | wc -l", capture=True,).strip()
+
+ metadata_file = path(sublimation_dir + "/package-metadata.json")
+ messages_file = path(sublimation_dir + "/messages.json")
+
metadata = json.loads(metadata_file.text())
- metadata['version'] = sh("git reflog --all | wc -l", capture=True,).strip()
+ metadata['version'] = version
+
+ messages = json.loads(messages_file.text())
+ messages[version] = messages['latest']
+ del messages['latest']
+
metadata_file.write_text(json.dumps(metadata, indent=4, sort_keys=True))
+ messages_file.write_text(json.dumps(messages, indent=4, sort_keys=True))
+
_git_amend() # save the new version number
+
+ messages['latest'] = "Some sort of awesome change!"
+ messages_file.write_text(json.dumps(messages, indent=4, sort_keys=True))
+
sh("git tag %s" % metadata['version'])
@task
def test():
"""run all unit tests"""
pass
+
+
+@task
+@cmdopts([
+ ('node-version=', 'v', 'Version to install (defaults to 0.6.6)')
+])
+def foo(options):
+ print dir(options)
+ print options.foo.keys()
+ print options.foo.node_version if hasattr(options.foo, 'node_version') else "v"

0 comments on commit 2b737cd

Please sign in to comment.