Skip to content

Commit

Permalink
Merge pull request #443 from ipfs/chore/improve-makefile
Browse files Browse the repository at this point in the history
fix(website): skip install if  deps present
  • Loading branch information
lidel committed Oct 6, 2023
2 parents b7d4ff0 + 64da550 commit 24861cd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
out/
out/
super-linter.log
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
SPEC_GENERATOR_VER=v1.3.2
SPEC_GENERATOR_VER=1.3.2

.PHONY: install

all: website

clean:
rm -rf ./out

install:
npm install -g spec-generator@$(SPEC_GENERATOR_VER)
@INSTALLED_VERSION=$$(spec-generator --version); \
if [ "$$INSTALLED_VERSION" != "$(SPEC_GENERATOR_VER)" ]; then \
echo "Installed version ($$INSTALLED_VERSION) is different from the desired version ($(SPEC_GENERATOR_VER))."; \
echo "Installing spec-generator@v$(SPEC_GENERATOR_VER)"; \
npm install -g spec-generator@v$(SPEC_GENERATOR_VER); \
else \
echo "spec-generator is already installed at the desired version ($(SPEC_GENERATOR_VER))."; \
fi

website: clean install
spec-generator -c .config.json
Expand Down

0 comments on commit 24861cd

Please sign in to comment.