lib/vim-flavor/flavor.rb in vim-flavor-1.0.3 vs lib/vim-flavor/flavor.rb in vim-flavor-1.1.0
- old
+ new
@@ -14,10 +14,13 @@
attr_accessor :group
# A version of a plugin to be installed.
attr_accessor :locked_version
+ # repo_name of a flavor which requires this flavor.
+ attr_accessor :requirer
+
# Return true if this flavor's repository is already cloned.
def cached?
Dir.exists?(cached_repo_path)
end
@@ -74,9 +77,18 @@
{
cd '#{cached_repo_path}' &&
git fetch --tags
} 2>&1
}
+ end
+
+ def checkout()
+ sh %Q[
+ {
+ cd '#{cached_repo_path}' &&
+ git checkout -f '#{locked_version}'
+ } 2>&1
+ ]
end
def deploy(flavors_path)
deployment_path = make_deployment_path(flavors_path)
sh %Q[