npm.io
2.0.1 • Published 8 years ago

@umm/git

Licence
MIT
Version
2.0.1
Deps
7
Size
23 kB
Vulns
0
Weekly
0
Stars
1
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

git

  • git コマンドの Unity 実装

Requirement

  • Unity 2017.1
  • git
  • hub (Optional)

Install

$ npm install github:umm-projects/git

Usage

実装済のクラス
  • Git
    • git コマンドを同期的に実行
  • GitAsync
    • git コマンドを非同期的に実行
  • Hub
    • hub コマンドを同期的に実行
  • HubAsync
    • hub コマンドを非同期的に実行
実装済のサブコマンド
  • add
  • branch
  • checkout
  • commit
  • push
  • rev-parse
  • rm
  • pull-request
    • hub コマンドを利用
同期的にコマンドを実行する
Git.Add(new [] { "hoge.txt", "fuga.cs", });
Git.Commit("message for commit");
Git.Push("any_branch_name");
非同期的にコマンドを実行する
// 書き方を統一するために、空の Unit を吐き出すところから開始している
Observable.Return(Unit.Default)
    .SelectMany(_ => GitAsync.Add(new [] { "hoge.txt", "fuga.cs", }))
    .SelectMany(_ => GitAsync.Commit("message for commit"))
    .SelectMany(_ => GitAsync.Push("any_branch_name"))
    .Subscribe();

License

Copyright (c) 2017-2018 Tetsuya Mori

Released under the MIT license, see LICENSE.txt