Skip to content

Commit

Permalink
Updating cli.js location and name
Browse files Browse the repository at this point in the history
  • Loading branch information
Neyromancer committed Oct 23, 2023
1 parent c62ecb3 commit edafff2
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 30 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ npm run build
For an easier and faster setup of your local environment, run:

```bash
node dist/cli.js setup <binaries>
cd ./<zombinet project dir>/javascript/packages
node ./cli/dist/cli.js <binaries>
```

This allows to use the `setup` script, making everything ready for a ZombieNet dev environment.
Expand All @@ -343,7 +344,8 @@ You can use the following arguments:
For example:

```bash
node dist/cli.js setup polkadot polkadot-parachain
cd cd ./<zombinet project dir>/javascript/packages
node ./cli/dist/cli.js setup polkadot polkadot-parachain
```

> Note: If you are using macOS please clone the [Polkadot repo](https://github.com/paritytech/polkadot) and run it locally. At the moment there is no `polkadot` binary for MacOs.
Expand Down Expand Up @@ -372,7 +374,8 @@ export PATH=$(pwd)/target/testnet:$PATH
With the above steps completed, the `zombienet` CLI is ready to run:

```bash
❯ node dist/cli.js
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js

Usage: zombienet [options] [command]

Expand Down
6 changes: 3 additions & 3 deletions docs/book/development.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ <h2 id="installation"><a class="header" href="#installation">Installation</a></h
</code></pre>
<h3 id="download-and-install-needed-artifacts-optional"><a class="header" href="#download-and-install-needed-artifacts-optional">Download and install needed artifacts (optional)</a></h3>
<p>For an easier and faster setup of your local environment, run:</p>
<pre><code class="language-bash">node dist/cli.js setup &lt;binaries&gt;
<pre><code class="language-bash">cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js setup &lt;binaries&gt;
</code></pre>
<p>This allows to use the <code>setup</code> script, making everything ready for a ZombieNet dev environment.</p>
<p>You can use the following arguments:</p>
<p><code>--help</code> shows the different options and commands for using the Zombienet CLI.
<code>--binaries</code> or <code>-b</code>: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: <code>polkadot</code>, <code>polkadot-parachain</code>.</p>
<p>For example:</p>
<pre><code class="language-bash">node dist/cli.js setup polkadot polkadot-parachain
<pre><code class="language-bash">cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js setup polkadot polkadot-parachain
</code></pre>
<blockquote>
<p>Note: If you are using macOS please clone the <a href="https://github.com/paritytech/polkadot">Polkadot repo</a> and run it locally. At the moment there is no <code>polkadot</code> binary for MacOs.</p>
Expand All @@ -179,7 +179,7 @@ <h3 id="download-and-install-needed-artifacts-optional"><a class="header" href="
</code></pre>
<h3 id="using-zombienet"><a class="header" href="#using-zombienet">Using Zombienet</a></h3>
<p>With the above steps completed, the <code>zombienet</code> CLI is ready to run:</p>
<pre><code class="language-bash">❯ node dist/cli.js
<pre><code class="language-bash">cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js

Usage: zombienet [options] [command]

Expand Down
6 changes: 3 additions & 3 deletions docs/book/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ <h3 id="download-and-install-needed-artifacts-optional">
<p>
For an easier and faster setup of your local environment, run:
</p>
<pre><code class="language-bash">node dist/cli.js setup &lt;binaries&gt;
<pre><code class="language-bash">cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js setup &lt;binaries&gt;
</code></pre>
<p>
This allows to use the <code>setup</code> script, making
Expand All @@ -1705,7 +1705,7 @@ <h3 id="download-and-install-needed-artifacts-optional">
<code>polkadot</code>, <code>polkadot-parachain</code>.
</p>
<p>For example:</p>
<pre><code class="language-bash">node dist/cli.js setup polkadot polkadot-parachain
<pre><code class="language-bash">cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js setup polkadot polkadot-parachain
</code></pre>
<blockquote>
<p>
Expand Down Expand Up @@ -1733,7 +1733,7 @@ <h3 id="using-zombienet">
With the above steps completed, the <code>zombienet</code> CLI is
ready to run:
</p>
<pre><code class="language-bash">❯ node dist/cli.js
<pre><code class="language-bash">cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js

Usage: zombienet [options] [command]

Expand Down
4 changes: 2 additions & 2 deletions docs/book/searchindex.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ Object.assign(window.search, {
title: "Installation",
},
37: {
body: "For an easier and faster setup of your local environment, run: node dist/cli.js setup <binaries> This allows to use the setup script, making everything ready for a ZombieNet dev environment. You can use the following arguments: --help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain. For example: node dist/cli.js setup polkadot polkadot-parachain Note: If you are using macOS please clone the Polkadot repo and run it locally. At the moment there is no polkadot binary for MacOs. The command above will retrieve the binaries provided and try to download and prepare those binaries for usage. At the end of the download, the setup script will provide a command to run in your local environment in order to add the directory where the binaries were downloaded in your $PATH var, for example: Please add the dir to your $PATH by running the command: export PATH=/home/<user>/current_directory:$PATH",
body: "For an easier and faster setup of your local environment, run: cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js setup <binaries> This allows to use the setup script, making everything ready for a ZombieNet dev environment. You can use the following arguments: --help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain. For example: cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js setup polkadot polkadot-parachain Note: If you are using macOS please clone the Polkadot repo and run it locally. At the moment there is no polkadot binary for MacOs. The command above will retrieve the binaries provided and try to download and prepare those binaries for usage. At the end of the download, the setup script will provide a command to run in your local environment in order to add the directory where the binaries were downloaded in your $PATH var, for example: Please add the dir to your $PATH by running the command: export PATH=/home/<user>/current_directory:$PATH",
breadcrumbs:
"Development » Download and install needed artifacts (optional)",
id: "37",
title: "Download and install needed artifacts (optional)",
},
38: {
body: 'With the above steps completed, the zombienet CLI is ready to run: ❯ node dist/cli.js Usage: zombienet [options] [command] Options: -p, --provider <provider> Override provider to use (choices: "podman", "kubernetes", default: kubernetes) -h, --help display help for command Commands: spawn <networkConfig> [creds] [monitor] Spawn the network defined in the config test <testFile> Run tests on the network defined version Prints zombienet version help [command] display help for command',
body: 'With the above steps completed, the zombienet CLI is ready to run: ❯ cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js Usage: zombienet [options] [command] Options: -p, --provider <provider> Override provider to use (choices: "podman", "kubernetes", default: kubernetes) -h, --help display help for command Commands: spawn <networkConfig> [creds] [monitor] Spawn the network defined in the config test <testFile> Run tests on the network defined version Prints zombienet version help [command] display help for command',
breadcrumbs: "Development » Using Zombienet",
id: "38",
title: "Using Zombienet",
Expand Down
4 changes: 2 additions & 2 deletions docs/book/searchindex.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@
"title": "Installation"
},
"37": {
"body": "For an easier and faster setup of your local environment, run: node dist/cli.js setup <binaries> This allows to use the setup script, making everything ready for a ZombieNet dev environment. You can use the following arguments: --help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain. For example: node dist/cli.js setup polkadot polkadot-parachain Note: If you are using macOS please clone the Polkadot repo and run it locally. At the moment there is no polkadot binary for MacOs. The command above will retrieve the binaries provided and try to download and prepare those binaries for usage. At the end of the download, the setup script will provide a command to run in your local environment in order to add the directory where the binaries were downloaded in your $PATH var, for example: Please add the dir to your $PATH by running the command: export PATH=/home/<user>/current_directory:$PATH",
"body": "For an easier and faster setup of your local environment, run: cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js setup <binaries> This allows to use the setup script, making everything ready for a ZombieNet dev environment. You can use the following arguments: --help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain. For example: cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js setup polkadot polkadot-parachain Note: If you are using macOS please clone the Polkadot repo and run it locally. At the moment there is no polkadot binary for MacOs. The command above will retrieve the binaries provided and try to download and prepare those binaries for usage. At the end of the download, the setup script will provide a command to run in your local environment in order to add the directory where the binaries were downloaded in your $PATH var, for example: Please add the dir to your $PATH by running the command: export PATH=/home/<user>/current_directory:$PATH",
"breadcrumbs": "Development » Download and install needed artifacts (optional)",
"id": "37",
"title": "Download and install needed artifacts (optional)"
},
"38": {
"body": "With the above steps completed, the zombienet CLI is ready to run: ❯ node dist/cli.js Usage: zombienet [options] [command] Options: -p, --provider <provider> Override provider to use (choices: \"podman\", \"kubernetes\", default: kubernetes) -h, --help display help for command Commands: spawn <networkConfig> [creds] [monitor] Spawn the network defined in the config test <testFile> Run tests on the network defined version Prints zombienet version help [command] display help for command",
"body": "With the above steps completed, the zombienet CLI is ready to run: ❯ cd ./<zombinet project dir>/javascript/packages && node ./cli/dist/cli.js Usage: zombienet [options] [command] Options: -p, --provider <provider> Override provider to use (choices: \"podman\", \"kubernetes\", default: kubernetes) -h, --help display help for command Commands: spawn <networkConfig> [creds] [monitor] Spawn the network defined in the config test <testFile> Run tests on the network defined version Prints zombienet version help [command] display help for command",
"breadcrumbs": "Development » Using Zombienet",
"id": "38",
"title": "Using Zombienet"
Expand Down
9 changes: 6 additions & 3 deletions docs/src/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ npm run build
For an easier and faster setup of your local environment, run:

```bash
node dist/cli.js setup <binaries>
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js <binaries>
```

This allows to use the `setup` script, making everything ready for a ZombieNet dev environment.
Expand All @@ -35,7 +36,8 @@ You can use the following arguments:
For example:

```bash
node dist/cli.js setup polkadot polkadot-parachain
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js setup polkadot polkadot-parachain
```

> Note: If you are using macOS please clone the [Polkadot repo](https://github.com/paritytech/polkadot) and run it locally. At the moment there is no `polkadot` binary for MacOs.
Expand All @@ -62,7 +64,8 @@ nix run nixpkgs#prefetch-npm-deps -- javascript/package-lock.json 2>/dev/null
With the above steps completed, the `zombienet` CLI is ready to run:

```bash
❯ node dist/cli.js
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js

Usage: zombienet [options] [command]

Expand Down
9 changes: 6 additions & 3 deletions javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ npm run build
For an easier and faster setup of your local environment, run:

```bash
node dist/cli.js setup <binaries>
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js setup <binaries>
```

This allows to use the `setup` script, making everything ready for a ZombieNet dev environment.
Expand All @@ -340,7 +341,8 @@ You can use the following arguments:
For example:

```bash
node dist/cli.js setup polkadot polkadot-parachain
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js setup polkadot polkadot-parachain
```

> Note: If you are using macOS please clone the [Polkadot repo](https://github.com/paritytech/polkadot) and run it locally. At the moment there is no `polkadot` binary for MacOs.
Expand Down Expand Up @@ -369,7 +371,8 @@ export PATH=$(pwd)/target/testnet:$PATH
With the above steps completed, the `zombienet` CLI is ready to run:

```bash
❯ node dist/cli.js
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js

Usage: zombienet [options] [command]

Expand Down
2 changes: 1 addition & 1 deletion javascript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
"package": "npm run -w packages/cli package",
"package:linux": "npm run -w packages/cli package:linux",
"package:macos": "npm run -w packages/cli package:macos",
"zombie": "node ./packages/cli/dist/cli.js",
"zombie": "node ./packages/cli/src/cli.ts",
"test": "npm run test --workspaces --if-present",
"postinstall": "if [[ -f .husky/post-install.js ]]; then cd .. && node javascript/.husky/post-install.js; fi"
},
"engines": {
"node": ">=18"
},
"bin": {
"zombienet": "./packages/cli/dist/cli.js"
"zombienet": "./packages/cli/src/cli.ts"
},
"dependencies": {
"@polkadot/keyring": "^12.5.1",
Expand Down
9 changes: 6 additions & 3 deletions javascript/packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ npm run build
For an easier and faster setup of your local environment, run:

```bash
node dist/cli.js setup <binaries>
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js setup <binaries>
```

This allows to use the `setup` script, making everything ready for a ZombieNet dev environment.
Expand All @@ -341,7 +342,8 @@ You can use the following arguments:
For example:

```bash
node dist/cli.js setup polkadot polkadot-parachain
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js setup polkadot polkadot-parachain
```

> Note: If you are using macOS please clone the [Polkadot repo](https://github.com/paritytech/polkadot) and run it locally. At the moment there is no `polkadot` binary for MacOs.
Expand Down Expand Up @@ -370,7 +372,8 @@ export PATH=$(pwd)/target/testnet:$PATH
With the above steps completed, the `zombienet` CLI is ready to run:

```bash
❯ node dist/cli.js
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js

Usage: zombienet [options] [command]

Expand Down
9 changes: 6 additions & 3 deletions javascript/packages/orchestrator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ npm run build
For an easier and faster setup of your local environment, run:

```bash
node dist/cli.js setup <binaries>
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js setup <binaries>
```

This allows to use the `setup` script, making everything ready for a ZombieNet dev environment.
Expand All @@ -359,7 +360,8 @@ You can use the following arguments:
For example:

```bash
node dist/cli.js setup polkadot polkadot-parachain
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js setup polkadot polkadot-parachain
```

> Note: If you are using macOS please clone the [Polkadot repo](https://github.com/paritytech/polkadot) and run it locally. At the moment there is no `polkadot` binary for MacOs.
Expand Down Expand Up @@ -388,7 +390,8 @@ export PATH=$(pwd)/target/testnet:$PATH
With the above steps completed, the `zombienet` CLI is ready to run:

```bash
❯ node dist/cli.js
cd ./<zombinet project dir>/javascript/packages
❯ node ./cli/dist/cli.js

Usage: zombienet [options] [command]

Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/docker/zombienet_injected.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ RUN npm install --production
RUN chown -R nonroot. /home/nonroot

# Change `cli` permissions and link to easy call
RUN chmod +x /home/nonroot/zombie-net/packages/cli/dist/cli.js
RUN ln -s /home/nonroot/zombie-net/packages/cli/dist/cli.js /usr/local/bin/zombie
RUN chmod +x /home/nonroot/zombie-net/packages/cli/src/cli.ts
RUN ln -s /home/nonroot/zombie-net/packages/cli/src/cli.ts /usr/local/bin/zombie

# Dependency for run test script when run inside container
RUN mkdir -p /var/log/zombie-net
Expand Down

0 comments on commit edafff2

Please sign in to comment.