-
Notifications
You must be signed in to change notification settings - Fork 4
Added documentation to justfile #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@x3c41a @karolk91 let's make "the justfile stuff running examples" work in CI #108 (comment) |
do you mind if it will be a separate PR? I want to experiment with justfile in this one... |
Why? What experiments with justfile? |
I want to split that one big
Yes, I agree. I just want to make it maintainable and utilise the full power of |
|
I updated README, please, take a look @bkontur |
fixed with the latest commit |
examples/justfile
Outdated
|
|
||
| # Test the complete workflow (builds, starts services, runs example, shuts down services) | ||
| # Parameters: api=[papi|pjs] - choose between Polkadot API (papi) or Polkadot JS (pjs) | ||
| authorize-and-store api="papi": build npm-install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| authorize-and-store api="papi": build npm-install | |
| run-authorize-and-store api="papi": build npm-install |
examples/justfile
Outdated
| # Initialize IPFS | ||
| just ipfs-init | ||
|
|
||
| # Start services | ||
| just ipfs-start | ||
| just bulletin-zombienet-start | ||
| just ipfs-connect | ||
| just ipfs-reconnect-start | ||
|
|
||
| # Generate PAPI descriptors if needed | ||
| if [ "$API_TYPE" == "papi" ]; then | ||
| just papi-generate | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would extract this to one step, that we can reuse, e.g. just setup-services
| # Initialize IPFS | |
| just ipfs-init | |
| # Start services | |
| just ipfs-start | |
| just bulletin-zombienet-start | |
| just ipfs-connect | |
| just ipfs-reconnect-start | |
| # Generate PAPI descriptors if needed | |
| if [ "$API_TYPE" == "papi" ]; then | |
| just papi-generate | |
| fi | |
| # Initialize IPFS | |
| just ipfs-init | |
| # Start services | |
| just ipfs-start | |
| just bulletin-zombienet-start | |
| just ipfs-connect | |
| just ipfs-reconnect-start | |
| # Generate PAPI descriptors if needed | |
| if [ "$API_TYPE" == "papi" ]; then | |
| just papi-generate | |
| fi |
examples/justfile
Outdated
| # Run the example | ||
| just run-example $API_TYPE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove run-example and trigger authorize_and_store here directly
| # Run the example | |
| just run-example $API_TYPE | |
| # Run the example | |
| if [ "$API_TYPE" == "papi" ]; then | |
| EXAMPLE_FILE="authorize_and_store_papi.js" | |
| else | |
| EXAMPLE_FILE="authorize_and_store.js" | |
| fi | |
| node $EXAMPLE_FILE |
examples/justfile
Outdated
|
|
||
| # Run the authorize-and-store example | ||
| # Parameters: api=[papi|pjs] - choose between Polkadot API (papi) or Polkadot JS (pjs) | ||
| run-example api="papi": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove run-example step.
At the end, we should be simply adding new examples, like:
run-store-big-data start-services="false":
if [[ "$start-services" == "true" ]]; then
just start-sevices
fi
node store_big_data.js
examples/justfile
Outdated
| $IPFS_CMD swarm connect /ip4/127.0.0.1/tcp/10001/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm || true | ||
|
|
||
| # Start zombienet in background | ||
| bulletin-zombienet-start: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, rename. we will add later bulletin-para-zombienet-start:
| bulletin-zombienet-start: | |
| bulletin-solo-zombienet-start: |
|
Addressed all the comments, double checked that the commands still work, PTAL |
No description provided.