Skip to content

Commit 24861cd

Browse files
authored
Merge pull request #443 from ipfs/chore/improve-makefile
fix(website): skip install if deps present
2 parents b7d4ff0 + 64da550 commit 24861cd

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
out/
1+
out/
2+
super-linter.log

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
SPEC_GENERATOR_VER=v1.3.2
1+
SPEC_GENERATOR_VER=1.3.2
2+
3+
.PHONY: install
24

35
all: website
46

57
clean:
68
rm -rf ./out
79

810
install:
9-
npm install -g spec-generator@$(SPEC_GENERATOR_VER)
11+
@INSTALLED_VERSION=$$(spec-generator --version); \
12+
if [ "$$INSTALLED_VERSION" != "$(SPEC_GENERATOR_VER)" ]; then \
13+
echo "Installed version ($$INSTALLED_VERSION) is different from the desired version ($(SPEC_GENERATOR_VER))."; \
14+
echo "Installing spec-generator@v$(SPEC_GENERATOR_VER)"; \
15+
npm install -g spec-generator@v$(SPEC_GENERATOR_VER); \
16+
else \
17+
echo "spec-generator is already installed at the desired version ($(SPEC_GENERATOR_VER))."; \
18+
fi
1019

1120
website: clean install
1221
spec-generator -c .config.json

0 commit comments

Comments
 (0)