ソースを参照

Make developing easier on a new machine

Andy Baugh 1 年間 前
コミット
00c8a027a9
2 ファイル変更10 行追加2 行削除
  1. 9 2
      Makefile
  2. 1 0
      githooks/pre-commit

+ 9 - 2
Makefile

@@ -1,7 +1,9 @@
+all: install-githooks depend
+
 install-githooks:
 	install githooks/* .git/hooks/
 
-test: compilecheck
+test: depend testdepend compilecheck
 	prove -mv t/*.t
 
 FILES2CHECK := $(shell find lib/ -name '*.pm')
@@ -12,4 +14,9 @@ tidy:
 	$(foreach FILE,$(FILES2CHECK),perltidy -b $(FILE) &&) /bin/true
 	perltidy -b t/*.t
 
-.PHONY: compilecheck test tidy install-githooks
+depend:
+	sudo cpanm Net::OpenSSH Net::SFTP::Foreign File::Slurper Data::UUID Expect File::HomeDir File::Temp IO::Pty IO::Socket::INET IO::Socket::INET6 IO::Stty List::Util Net::DNS::Resolver Net::IP Time::HiRes Term::ANSIColor
+
+testdepend:
+	sudo cpanm Test2::V0 Test2::Tools::Explain Test2::Tools::Subtest Test2::Plugin::NoWarnings Test::MockModule
+.PHONY: compilecheck test tidy install-githooks depend testdepend

+ 1 - 0
githooks/pre-commit

@@ -1,3 +1,4 @@
 #!/bin/sh
 make test
 make tidy
+git add -u