Skip to content

Commit

Permalink
fix: refactor for makefile
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed May 7, 2024
1 parent 070f96c commit 7167392
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ test: $(TEST_DATASET_PATH)
cd ../example && npm install ../vald-client-node-$${version}.tgz -s -f; \
DIM=300 node example.js)

$(TEST_DATASET_PATH):
curl -L https://raw.githubusercontent.com/rinx/word2vecjson/master/data/wordvecs1000.json -o $(TEST_DATASET_PATH)

.PHONY: ci/deps/install
## install deps for CI environment
ci/deps/install:
Expand All @@ -270,21 +273,6 @@ ci/deps/install:
ci/deps/update:
@echo "Nothing do be done"

.PHONY: npm/deps/install
npm/deps/install: \
$(BUF_GEN_PATH)

$(BUF_GEN_PATH):
npm install --save-dev @bufbuild/buf @bufbuild/protobuf

.PHONY: proto/deps
## install proto deps
proto/deps: \
npm/deps/install

$(TEST_DATASET_PATH):
curl -L https://raw.githubusercontent.com/rinx/word2vecjson/master/data/wordvecs1000.json -o $(TEST_DATASET_PATH)

.PHONY: ci/package/prepare
## prepare for publich
ci/package/prepare: \
Expand All @@ -295,6 +283,14 @@ ci/package/prepare: \
ci/package/publish:
npm publish

.PHONY: proto/deps/install
## install proto deps
proto/deps/install: \
$(BUF_GEN_PATH)

$(BUF_GEN_PATH):
npm install --save-dev @bufbuild/buf @bufbuild/protobuf

.PHONY: version/node
## Print Node version
version/node:
Expand Down

0 comments on commit 7167392

Please sign in to comment.