forked from KYVENetwork/kyve-rdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
3 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
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 |
---|---|---|
@@ -1,12 +1,28 @@ | ||
#!/bin/sh | ||
|
||
# Set INTEGRATIONS_DIR | ||
INTEGRATIONS_DIR="$(pwd)"/integrations | ||
if [ ! -d "$INTEGRATIONS_DIR" ]; then | ||
INTEGRATIONS_DIR="$(pwd)"/../../integrations | ||
fi | ||
if [ ! -d "$INTEGRATIONS_DIR" ]; then | ||
echo "Could not find INTEGRATIONS_DIR folder" | ||
exit 1 | ||
fi | ||
|
||
# Set KYSTRAP_DIR | ||
KYSTRAP_DIR="$(pwd)"/tools/kystrap | ||
if [ ! -d "$KYSTRAP_DIR" ]; then | ||
KYSTRAP_DIR="$(pwd)"/../kystrap | ||
fi | ||
|
||
# Build docker image | ||
docker build --tag kystrap . | ||
docker build --tag kystrap "$KYSTRAP_DIR" || exit 1 | ||
|
||
# Run docker image | ||
docker run \ | ||
-it `# Interactive mode` \ | ||
--rm `# Remove container after run` \ | ||
--user "$(id -u):$(id -g)" `# Run as current user` \ | ||
-v $(pwd)/../../integrations:/app/out `# Mount integrations folder` \ | ||
kystrap $(echo "$@") # Pass all arguments to kystrap | ||
-v "$INTEGRATIONS_DIR":/app/out `# Mount integrations folder` \ | ||
kystrap $(echo "$@") # Pass all arguments to kystrap |