This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (48 loc) · 1.54 KB
/
Makefile
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
45
46
47
48
49
50
51
52
53
54
55
56
.PHONY: help
help:
@echo "Targets:"
@echo " build-app Build and install pipefy-message gem"
@echo " build-app-infra Run docker-compose with localstack infra"
@echo " delete-app-infra Delete docker-compose localstack infra"
@echo " recreate-app-infra Rebuild docker-compose localstack infra"
@echo " run-dev-env Run a developer container environment"
@echo " run-lint Run linter"
@echo " run-lint-fix Fix linter issues"
@echo " test Run rspec tests"
.PHONY: build-app
build-app:
bundle install --no-cache
gem build pipefy_message.gemspec
gem install pipefy_message-[0-9].[0-9].[0-9].gem
.PHONY: build-app-infra
build-app-infra:
@docker-compose up -d
@echo "Checking if the localstack SNS and SQS resources are created"
@sleep 10
docker logs aws-cli;
.PHONY: delete-app-infra
delete-app-infra:
@docker-compose down -v --remove-orphans
.PHONY: recreate-app-infra
recreate-app-infra: delete-app-infra build-app-infra
.PHONY: run-dev-env
run-dev-env:
docker run \
-it \
--rm \
--net=host \
-v $(shell pwd):/home/pipefy_message \
-w /home/pipefy_message \
-e ENABLE_AWS_CLIENT_CONFIG="true" \
-e ASYNC_APP_ENV="development" \
ruby:2.7.6 \
bash
.PHONY: run-lint
run-lint:
bundle exec rubocop
.PHONY: run-lint-fix
run-lint-fix:
bundle exec rubocop -A
.PHONY: test
test:
bundle exec rspec