blob: 8b3caf8c6c5d7350ef8eba318b9ab525db45a5c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
.PHONY: validate verify verify_ruby verify_golang test test_ruby test_golang setup _install build compile check clean
GO_SOURCES := $(shell find go -name '*.go')
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, bin/gitlab-shell-authorized-keys-check and
# bin/gitlab-shell-authorized-principals-check must exist and need to be
# the Ruby version for rspec to be able to test.
cp bin/gitlab-shell-ruby bin/gitlab-shell
cp bin/gitlab-shell-authorized-keys-check-ruby bin/gitlab-shell-authorized-keys-check
cp bin/gitlab-shell-authorized-principals-check-ruby bin/gitlab-shell-authorized-principals-check
bundle exec rspec --color --tag '~go' --format d spec
rm -f bin/gitlab-shell bin/gitlab-shell-authorized-keys-check bin/gitlab-shell-authorized-principals-check
test_golang:
support/go-test
setup: _install bin/gitlab-shell
_install:
bin/install
build: bin/gitlab-shell
compile: bin/gitlab-shell
bin/gitlab-shell: $(GO_SOURCES)
bin/compile
check:
bin/check
clean:
rm -f bin/gitlab-shell bin/gitlab-shell-authorized-keys-check bin/gitlab-shell-authorized-principals-check
|