From 291dfcafbfbccabe22cb81fb75eaba610497bb80 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 23 Sep 2020 17:28:38 +0300 Subject: [PATCH] makefile: install yarn (#526) * makefile: install yarn * gitignore --- .gitignore | 1 + Makefile | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9518651c..d9cdfa46 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ docs/node_modules docs/modules dist tools-stamp +docs-tools-stamp proto-tools-stamp golangci-lint keyring_test_cosmos diff --git a/Makefile b/Makefile index d9bc279a..0e0e570c 100644 --- a/Makefile +++ b/Makefile @@ -221,8 +221,16 @@ else @echo "solcjs already installed; skipping..." endif +docs-tools: +ifeq (, $(shell which yarn)) + @echo "Installing yarn..." + @npm install -g yarn +else + @echo "yarn already installed; skipping..." +endif + tools: tools-stamp -tools-stamp: contract-tools runsim +tools-stamp: contract-tools docs-tools runsim # Create dummy file to satisfy dependency and avoid # rebuilding when this Makefile target is hit twice # in a row. @@ -232,7 +240,13 @@ tools-clean: rm -f $(RUNSIM) rm -f tools-stamp -.PHONY: runsim tools tools-stamp tools-clean +docs-tools-stamp: docs-tools + # Create dummy file to satisfy dependency and avoid + # rebuilding when this Makefile target is hit twice + # in a row. + touch $@ + +.PHONY: runsim tools tools-stamp tools-clean docs-tools-stamp ############################################################################### ### Tests & Simulation ### @@ -402,7 +416,8 @@ docs-serve: # Build the site into docs/.vuepress/dist docs-build: - @cd docs && \ + @$(MAKE) docs-tools-stamp && \ + cd docs && \ yarn install && \ yarn run build