Class: Lolipop::Mc::Starter::Rails::CheckItem::GitLog
- Defined in:
- lib/lolipop/mc/starter/rails/check_item/git_log.rb
Constant Summary
Constants inherited from Base
Base::NOCHECK, Base::SKIPCHECK
Instance Method Summary collapse
Methods inherited from Base
#desc, #dump_config, #initialize, #item_name, #load_config
Constructor Details
This class inherits a constructor from Lolipop::Mc::Starter::Rails::CheckItem::Base
Instance Method Details
#check ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/lolipop/mc/starter/rails/check_item/git_log.rb', line 7 def check begin stdout = `git log` rescue => e raise "まだローカルのGitリポジトリにコミットがないようです #{e.}" end raise "まだローカルのGitリポジトリにコミットがないようです" if stdout == "" 'ローカルのGitリポジトリにコミットがあります' end |
#hint ⇒ Object
17 18 19 20 21 |
# File 'lib/lolipop/mc/starter/rails/check_item/git_log.rb', line 17 def hint puts 'ロリポップ!マネージドクラウドのRailsプロジェクトでは `git push` をすることでマネージドクラウドにRailsアプリケーションをデプロイします' puts 'そのためにはローカルのGitリポジトリに`git commit`が必要です' puts "`git add . && git commit -m'First commit'` などを実行してコミットを作成してください" end |