Created
September 19, 2012 11:56
-
-
Save vasc/3749276 to your computer and use it in GitHub Desktop.
Artisan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "name": "Artisan", | |
"scopeName": "source.deploy", | |
"fileTypes": ["patent"], | |
"patterns": [ | |
{ | |
"match": "^\\s*(patent\\b|run\\b|error\\b|before\\b|after\\b|default\\b)", | |
"name": "storage.type.deploy" | |
}, | |
{ | |
"comment": "keyword operators that evaluate to True or False", | |
"match": "\\b(and|in|is|not|or)\\b", | |
"name": "keyword.operator.logical.deploy" | |
}, | |
{ | |
"match": "\\=|\\~", | |
"name": "keyword.operator.assignment.deploy" | |
}, | |
{ "match": "\\b(if|else|elif|for|while)\\b", | |
"name": "keyword.control.deploy" | |
}, | |
{ "match": "@\\w+\\s*$", | |
"name": "entity.name.class.deploy" | |
}, | |
{ | |
"match": "(\\-\\-[\\-\\w]+|\\-\\w)\\b", | |
"name": "variable.parameter.function.deploy" | |
}, | |
{ | |
"begin": "'", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.deploy" | |
} | |
}, | |
"end": "'", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.deploy" | |
} | |
}, | |
"name": "string.quoted.single.deploy" | |
}, | |
{ | |
"begin": "\"", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.deploy" | |
} | |
}, | |
"end": "\"", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.deploy" | |
} | |
}, | |
"name": "string.quoted.double.deploy" | |
}, | |
{ | |
"begin": "\\{", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.deploy" | |
} | |
}, | |
"end": "\\}", | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.deploy" | |
} | |
}, | |
"name": "source.python.deploy", | |
"patterns": [ | |
{ | |
"include": "source.python" | |
} | |
] | |
} | |
], | |
"uuid": "a02eddc9-b7ba-4195-ba14-05bb1198e10e" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
patent revert-pullrequest: | |
run: | |
git fetch {remote} | |
git checkout --hard {remote}/{branch} -b {revert_branch_name} | |
parents = git cat-file -p upstream/master | grep parent | wc -l @stdout | |
if { parents > 1 }: | |
git revert {commit} -m {parent} --no-edit | |
else: | |
git revert {commit} --no-edit | |
git push {remote} {revert_branch_name} | |
echo {revert_branch_name} | |
error ~ 'git revert': | |
'Automatic revert is not possible.' | |
{error.stderr} | |
before: | |
git stash | |
previous_branch = git branch | grep * | awk "{print $1}" @stdout | |
after: | |
git checkout --hard {previous_branch} | |
git stash pop | |
default: | |
commit | |
remote = 'origin' | |
branch = 'master' | |
revert_branch_name = 'revert-commit-{commit}' | |
parent = 1 | |
revert_message_merge_commit = '' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment