Improve grammar scripts (#3350)

* Remove trailing spaces

* Setup Bundler in some scripts

* Update grammar index

* Make prune-grammars script to be callable in a script directory

* Prune unused xquery grammar repo

source.xq by language-jsoniq is actual tm_scope for XQuery.

* Remove xquery submodule

git submodule deinit vendor/grammars/xquery/
git rm vendor/grammars/xquery/

* Fix invocation of script/list-grammars

This fixes #3339.

* Make add-grammars script to be callable in a script directory

* Generate samples.json before running list-grammars

list-grammars requires linguist.
This commit is contained in:
meganemura
2016-11-30 03:13:33 +09:00
committed by Brandon Black
parent 581723748b
commit 12f9295dd7
9 changed files with 25 additions and 18 deletions

View File

@@ -78,6 +78,8 @@ https = "https://#{parts[:host]}/#{parts[:user]}/#{parts[:repo]}"
repo_new = "vendor/grammars/#{parts[:repo]}"
repo_old = parse_submodule($replace) if $replace
Dir.chdir(ROOT)
if repo_old
log "Deregistering: #{repo_old}"
`git submodule deinit #{repo_old}`
@@ -93,4 +95,5 @@ log "Confirming license"
`script/licensed --module "#{repo_new}"`
log "Updating grammar documentation in vendor/REAEDME.md"
`script list-grammars`
`bundle exec rake samples`
`script/list-grammars`