forked from Amsterdam/signals-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (30 loc) · 1.43 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
# This Makefile is based on the Makefile defined in the Python Best Practices repository:
# https://git.datapunt.amsterdam.nl/Datapunt/python-best-practices/blob/master/dependency_management/
#
.PHONY = help build stop pull start stop release
dc = docker-compose
BUILD_ENV ?= development
GITHUB_TOKEN := $(shell cat .githubtoken)
JIRA_TOKEN := $(shell cat .jiratoken)
JIRA_USER := ${shell git config --get user.email}
JIRA_URL = https://datapunt.atlassian.net
REPOSITORY := ${shell git config --get remote.origin.url | sed -E 's/^git@github\.com:(.*)\.git/\1/'}
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
pull: ## Pull the docker images
$(dc) pull
build: pull ## Build docker image
BUILD_ENV=$(BUILD_ENV) $(dc) build
release: .jiratoken .githubtoken ## Run the siali `release` command. Make sure that the siali script is globally executable
@siali release \
--gitHubToken=${GITHUB_TOKEN} \
--jiraToken=${JIRA_TOKEN} \
--jiraUser=${JIRA_USER} \
--jiraUrl=${JIRA_URL} \
--repository=${REPOSITORY}
start: build ## Run frontend w/production build
$(dc) run --service-ports frontend
start-dev: build ## Run frontend
$(dc) run --service-ports frontend-dev
stop: ## Clean docker stuff
$(dc) down -v --remove-orphans