<commit_before>##### init #####

install:
	git pull
	$(MAKE) depend
	$(MAKE) devDepend
	$(MAKE) vendoring
	$(MAKE) gen
	cd front && npm install && npm run build
	$(MAKE) bindata
	$(MAKE) local

##### depend #####

depend:
	go get -u github.com/goadesign/goa
	go get -u github.com/goadesign/goa/goagen
	go get -u github.com/jteeuwen/go-bindata/...
	go get -u github.com/Masterminds/glide
	go get -u github.com/deadcheat/goacors

devDepend:
	go get -u github.com/alecthomas/gometalinter
	gometalinter --install --update --force

vendoring:
	rm -rf ./vendor
	glide install

##### goa ######

REPO:=github.com/enow-dev/enow

init: depend bootstrap
gen: clean generate

bootstrap:
	goagen bootstrap -d $(REPO)/design

main:
	goagen main -d $(REPO)/design

clean:
	rm -rf app
	rm -rf client
	rm -rf tool
	rm -rf swagger
	rm -rf schema
	rm -rf js
	rm -f build

generate:
	goagen app     -d $(REPO)/design
	goagen swagger -d $(REPO)/design -o server
	goagen client -d $(REPO)/design

swaggerUI:
	open http://localhost:8080/swaggerui/index.html

run:
	go run main.go

build:
	goapp build -o goa-spa-sample ./server

lint:
	@if [ "`gometalinter ./... --config=lint_config.json | tee /dev/stderr`" ]; then \
		echo "^ - lint err" && echo && exit 1; \
	fi

local:
	cp -f ./server/env.yaml.dev ./server/env.yaml
	goapp serve ./server

staging-deploy:
	cp -f ./server/env.yaml.staging ./server/env.yaml
	goapp deploy -application enow-staging ./server

staging-rollback:
	appcfg.py rollback ./server -A enow-staging

##### etc ######

no-secure-local:
	cp -f ./server/env.yaml.dev.nosec ./server/env.yaml
	goapp serve ./server

preDeploy:
	$(MAKE) gen
	cd front && npm install && npm run build
	cp -f ./server/env.yaml.staging ./server/env.yaml
	$(MAKE) staging-deploy

gcp-project-set:
	gcloud config set project enow-staging<commit_msg>add: datastoreを削除するコマンド<commit_after>##### init #####

install:
	git pull
	$(MAKE) depend
	$(MAKE) devDepend
	$(MAKE) vendoring
	$(MAKE) gen
	cd front && npm install && npm run build
	$(MAKE) bindata
	$(MAKE) local

##### depend #####

depend:
	go get -u github.com/goadesign/goa
	go get -u github.com/goadesign/goa/goagen
	go get -u github.com/jteeuwen/go-bindata/...
	go get -u github.com/Masterminds/glide
	go get -u github.com/deadcheat/goacors

devDepend:
	go get -u github.com/alecthomas/gometalinter
	gometalinter --install --update --force

vendoring:
	rm -rf ./vendor
	glide install

##### goa ######

REPO:=github.com/enow-dev/enow

init: depend bootstrap
gen: clean generate

bootstrap:
	goagen bootstrap -d $(REPO)/design

main:
	goagen main -d $(REPO)/design

clean:
	rm -rf app
	rm -rf client
	rm -rf tool
	rm -rf swagger
	rm -rf schema
	rm -rf js
	rm -f build

generate:
	goagen app     -d $(REPO)/design
	goagen swagger -d $(REPO)/design -o server
	goagen client -d $(REPO)/design

swaggerUI:
	open http://localhost:8080/swaggerui/index.html

run:
	go run main.go

build:
	goapp build -o goa-spa-sample ./server

lint:
	@if [ "`gometalinter ./... --config=lint_config.json | tee /dev/stderr`" ]; then \
		echo "^ - lint err" && echo && exit 1; \
	fi

local:
	cp -f ./server/env.yaml.dev ./server/env.yaml
	goapp serve ./server

staging-deploy:
	cp -f ./server/env.yaml.staging ./server/env.yaml
	goapp deploy -application enow-staging ./server

staging-rollback:
	appcfg.py rollback ./server -A enow-staging

##### etc ######

no-secure-local:
	cp -f ./server/env.yaml.dev.nosec ./server/env.yaml
	goapp serve ./server

preDeploy:
	$(MAKE) gen
	cd front && npm install && npm run build
	cp -f ./server/env.yaml.staging ./server/env.yaml
	$(MAKE) staging-deploy

gcp-project-set:
	gcloud config set project enow-staging

delete-datastore:
	dev_appserver.py --clear_datastore=yes ./server
{'fraction_non_alphanumeric': 0.1532474503488996, 'fraction_numerical': 0.0026838432635534087, 'mean_word_length': 3.168903803131991, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1574462', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1439, 'n_words': 400}