-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile, enable configuring NODES_DIR, use linked desci-models
- Loading branch information
Showing
5 changed files
with
118 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,6 @@ yarn-error.log* | |
.npmrc | ||
|
||
.idea | ||
|
||
# contract symlinks | ||
src/desci-contracts-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Override this location with env `NODES_DIR=../some/path` | ||
NODES_DIR?=../nodes | ||
NODES_ABS=$(realpath $(NODES_DIR)) | ||
|
||
.PHONY: build | ||
build: .env install nodes | ||
|
||
.PHONY: nodes | ||
nodes: | ||
$(MAKE) -C $(NODES_DIR) build | ||
yarn link @desci-labs/desci-models | ||
|
||
# Link contract artifacts to this project. | ||
# -s symlink | ||
# -f overwrite (so we can re-build against a different contract repo version) | ||
# -T treat target as a file (otherwise it will nest in an existing dir link) | ||
ln -sfT $(NODES_ABS)/desci-contracts/artifacts src/desci-contracts-artifacts | ||
ln -sfT $(NODES_ABS)/desci-contracts/.openzeppelin src/desci-contracts-config | ||
|
||
|
||
.PHONY: install | ||
install: | ||
yarn | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf node_modules | ||
rm -rf build | ||
# Unlinking desci-models (may fail if not present, that's okay) | ||
yarn unlink @desci-labs/desci-models || true | ||
# Clean up symlinks | ||
rm -f src/desci-contracts-* | ||
|
||
.PHONY: .env | ||
.env: | ||
cp --no-clobber .env.example .env || true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters