Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ainame/git_submodule_task
git_submodule_task provide DSL to write task for git submodule.
https://github.com/ainame/git_submodule_task
Last synced: about 2 months ago
JSON representation
git_submodule_task provide DSL to write task for git submodule.
- Host: GitHub
- URL: https://github.com/ainame/git_submodule_task
- Owner: ainame
- License: mit
- Created: 2013-07-29T14:58:04.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-30T00:47:43.000Z (over 11 years ago)
- Last Synced: 2024-05-01T19:27:03.598Z (8 months ago)
- Language: Ruby
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# GitSubmoduleTask
git_submodule_task provide the internal DSL to write tasks for git submodule.
## Installation
$ git clone [email protected]:ainame/git_submodule_task.git
$ cd git_submodule_task
$ gem build git_submodule_task.gemspec
$ gem install git_submodule_task-0.0.1.gem## Usage
1. install gem
2. create `Submodulefile` on project's root directory
3. write the task on it.for example
```ruby
require 'git_submodule_task/dsl'submodule 'library/ActionBarSherlock' do |sm|
# force reset to update...
sm.execute "git reset HEAD --hard"# pull from original source
sm.execute "git pull github master"# commit to parent repository
sm.parent.commit("[submodule] update #{sm.repo_path}\"")# reflect to remote of submodule
sm.execute "git push origin master"# commit to remote parent repository
sm.parent.push('origin', sm.parent.current_branch)
end
```
4. Then, execute `submodule_update SUBMODULE_PATH`, git_submodule_task execute that task.## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request