Skip to content

Commit

Permalink
feature branch
Browse files Browse the repository at this point in the history
  • Loading branch information
NorthIsUp committed Dec 27, 2011
1 parent 23d87e5 commit 2b737cd
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Default.sublime-keymap
@@ -1,3 +1,4 @@
[
{ "keys": ["alt+s"], "command": "block_select" }
{ "keys": ["alt+s"], "command": "block_select" },
{ "keys": ["alt+c"], "command": "update_api_doc" }
]
17 changes: 17 additions & 0 deletions Sublimation.py
@@ -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)
37 changes: 31 additions & 6 deletions support/pavement.py
@@ -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",
Expand Down Expand Up @@ -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.