Vendor textmate bundles as submodules

This commit is contained in:
Kevin Sawicki 2013-01-03 09:57:13 -08:00
parent 73b38b6b59
commit 4078046ac6
17 changed files with 55 additions and 31 deletions

36
.gitmodules vendored Normal file
View File

@ -0,0 +1,36 @@
[submodule "vendor/packages/text.tmbundle"]
path = vendor/packages/text.tmbundle
url = https://github.com/textmate/text.tmbundle.git
[submodule "vendor/packages/css.tmbundle"]
path = vendor/packages/css.tmbundle
url = https://github.com/textmate/css.tmbundle.git
[submodule "vendor/packages/html.tmbundle"]
path = vendor/packages/html.tmbundle
url = https://github.com/textmate/html.tmbundle.git
[submodule "vendor/packages/javascript.tmbundle"]
path = vendor/packages/javascript.tmbundle
url = https://github.com/textmate/javascript.tmbundle.git
[submodule "vendor/packages/ruby-on-rails-tmbundle"]
path = vendor/packages/ruby-on-rails-tmbundle
url = https://github.com/drnic/ruby-on-rails-tmbundle.git
[submodule "vendor/packages/ruby.tmbundle"]
path = vendor/packages/ruby.tmbundle
url = https://github.com/textmate/ruby.tmbundle.git
[submodule "vendor/packages/coffee-script-tmbundle"]
path = vendor/packages/coffee-script-tmbundle
url = https://github.com/kevinsawicki/coffee-script-tmbundle.git
[submodule "vendor/packages/puppet-textmate.tmbundle"]
path = vendor/packages/puppet-textmate.tmbundle
url = https://github.com/cburyta/puppet-textmate.tmbundle.git
[submodule "vendor/packages/c.tmbundle"]
path = vendor/packages/c.tmbundle
url = https://github.com/textmate/c.tmbundle.git
[submodule "vendor/packages/objective-c.tmbundle"]
path = vendor/packages/objective-c.tmbundle
url = https://github.com/textmate/objective-c.tmbundle.git
[submodule "vendor/packages/git.tmbundle"]
path = vendor/packages/git.tmbundle
url = https://github.com/textmate/git.tmbundle.git
[submodule "vendor/packages/json.tmbundle"]
path = vendor/packages/json.tmbundle
url = https://github.com/textmate/json.tmbundle.git

View File

@ -85,36 +85,9 @@ task "create-dot-atom" do
`cp -r "#{dot_atom_template_path}/themes" "#{DOT_ATOM_PATH}"`
end
desc "Clone default bundles into .atom directory"
task "clone-default-bundles" => "create-dot-atom" do
bundles = {
"https://github.com/textmate/css.tmbundle.git" => "aa549903ff01e9ba7dc0bd83f2cfe7ab54feab2d",
"https://github.com/textmate/html.tmbundle.git" => "af4fef34e1df538eda9a166912047b610530ece0",
"https://github.com/textmate/javascript.tmbundle.git" => "58e81b0eae498c9a4eb6e395368df3b7a01d9851",
"https://github.com/drnic/ruby-on-rails-tmbundle.git" => "683f6e652cc467e0007f80aa11f174a4d9189f3c",
"https://github.com/textmate/ruby.tmbundle.git" => "daad8ef03de9630e74578a046240fd9acc63b8b5",
"https://github.com/textmate/text.tmbundle.git" => "061224bd78fd98d02035466cdd959bf29995c2c5",
"https://github.com/jashkenas/coffee-script-tmbundle.git" => "20d9b95240bbbc27565c74c7227b8c6eb9049f78",
"https://github.com/cburyta/puppet-textmate.tmbundle.git" => "5ef4949b2c964bace86782573cb952751ca77f5e",
"https://github.com/textmate/c.tmbundle.git" => "c8a6516c1131055bfcd1bca5e2ee6567c2f50058",
"https://github.com/textmate/objective-c.tmbundle.git" => "b0826e645a3d8ca37dd625a56935d49cc8eeb9fc",
"https://github.com/textmate/git.tmbundle.git" => "132724ab03dfc70fc77deca8ef1a359dc8404d80",
"https://github.com/textmate/json.tmbundle.git" => "5765750aa970c72decef3e2fcefec16a0f22e427",
}
`rm -rf #{File.join(DOT_ATOM_PATH, 'bundles', 'ruby-on-rails.tmbundle')}` # github/textmate removed this repo, use drnic's repo instead
for bundle_url, sha in bundles
bundle_dir = bundle_url[/([^\/]+?)(\.git)?$/, 1]
dest_path = File.join(DOT_ATOM_PATH, "packages", bundle_dir)
if File.exists? dest_path
`cd #{dest_path} && git fetch --quiet`
else
`git clone --quiet #{bundle_url} #{dest_path}`
end
`cd #{dest_path} && git reset --quiet --hard #{sha}`
end
desc "Clone default bundles into vendor/bundles directory"
task "clone-default-bundles" do
`git submodule update --recursive --init`
end
desc "Clean build Atom via `xcodebuild`"

View File

@ -19,3 +19,4 @@ exit_unless_xcode_exists
exit_unless_npm_exists
npm install
git submodule update --recursive --init

View File

@ -11,6 +11,7 @@ configJsonPath = fs.join(configDirPath, "config.json")
userInitScriptPath = fs.join(configDirPath, "atom.coffee")
bundledThemesDirPath = fs.join(resourcePath, "themes")
bundledPackagesDirPath = fs.join(resourcePath, "src/packages")
bundledVendorPackagesDirPath = fs.join(resourcePath, "vendor/packages")
userThemesDirPath = fs.join(configDirPath, "themes")
userPackagesDirPath = fs.join(configDirPath, "packages")
@ -20,7 +21,7 @@ module.exports =
class Config
configDirPath: configDirPath
themeDirPaths: [userThemesDirPath, bundledThemesDirPath]
packageDirPaths: [userPackagesDirPath, bundledPackagesDirPath]
packageDirPaths: [userPackagesDirPath, bundledVendorPackagesDirPath, bundledPackagesDirPath]
settings: null
constructor: ->

View File

@ -5,6 +5,7 @@ paths = [
"#{window.resourcePath}/src/app"
"#{window.resourcePath}/src/packages"
"#{window.resourcePath}/src"
"#{window.resourcePath}/vendor/packages"
"#{window.resourcePath}/vendor"
"#{window.resourcePath}/static"
"#{window.resourcePath}/bundles"

1
vendor/packages/c.tmbundle vendored Submodule

@ -0,0 +1 @@
Subproject commit c8a6516c1131055bfcd1bca5e2ee6567c2f50058

@ -0,0 +1 @@
Subproject commit 29c6ecbc7cd46466e25d11b01d57fb279085ce64

1
vendor/packages/css.tmbundle vendored Submodule

@ -0,0 +1 @@
Subproject commit aa549903ff01e9ba7dc0bd83f2cfe7ab54feab2d

1
vendor/packages/git.tmbundle vendored Submodule

@ -0,0 +1 @@
Subproject commit 132724ab03dfc70fc77deca8ef1a359dc8404d80

1
vendor/packages/html.tmbundle vendored Submodule

@ -0,0 +1 @@
Subproject commit af4fef34e1df538eda9a166912047b610530ece0

@ -0,0 +1 @@
Subproject commit 58e81b0eae498c9a4eb6e395368df3b7a01d9851

1
vendor/packages/json.tmbundle vendored Submodule

@ -0,0 +1 @@
Subproject commit 5765750aa970c72decef3e2fcefec16a0f22e427

@ -0,0 +1 @@
Subproject commit b0826e645a3d8ca37dd625a56935d49cc8eeb9fc

@ -0,0 +1 @@
Subproject commit 5ef4949b2c964bace86782573cb952751ca77f5e

@ -0,0 +1 @@
Subproject commit 683f6e652cc467e0007f80aa11f174a4d9189f3c

1
vendor/packages/ruby.tmbundle vendored Submodule

@ -0,0 +1 @@
Subproject commit daad8ef03de9630e74578a046240fd9acc63b8b5

1
vendor/packages/text.tmbundle vendored Submodule

@ -0,0 +1 @@
Subproject commit 061224bd78fd98d02035466cdd959bf29995c2c5