summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-06-05 10:07:35 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2019-06-27 23:56:45 +1000
commit0258d8a8607606e9b4c2bb99ede62e7eee94b8ab (patch)
tree9f198dcac96580093b7c32267ca609885b1a9580
parente896becc9f6ee5ce9b134c32d7784f7c408bb50e (diff)
downloadgitlab-shell-0258d8a8607606e9b4c2bb99ede62e7eee94b8ab.tar.gz
Add Makefile for easier building and testing
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e9a81b2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+.PHONY: test test_ruby test_ruby_rubocop test_ruby_rspec test_go test_go_format test_go_test
+
+validate: verify test
+
+verify: verify_ruby verify_golang
+
+verify_ruby:
+ bundle exec rubocop
+
+verify_golang:
+ support/go-format check
+
+test: test_ruby test_golang
+
+test_ruby:
+ # bin/gitlab-shell must exist and needs to be the Ruby version for
+ # rspec to be able to test.
+ cp bin/gitlab-shell-ruby bin/gitlab-shell
+ bundle exec rspec --color --tag '~go' --format d spec
+ rm -f bin/gitlab-shell
+
+test_golang:
+ support/go-test
+
+setup: compile
+build: compile
+compile:
+ bin/install
+ bin/compile
+
+check:
+ bin/check
+
+clean:
+ rm -f bin/gitlab-shell