Skip to content

Commit

Permalink
feat: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
QEDK committed Mar 7, 2024
1 parent 4e6b5ad commit 697018d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules
.DS_Store
index.js
build
avail_path
identity.toml
7 changes: 6 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ async function data(blob: string, options: {
const lc = async (options: {
network: NetworkNames
config: string
identity: string
identity: string,
upgrade: boolean,
}): Promise<void> => {
try {
let cmd = `curl -sL1 avail.sh | sh -s -- --network ${options.network}`
Expand All @@ -165,6 +166,9 @@ const lc = async (options: {
if (typeof (options.identity) !== 'undefined') {
cmd = cmd.concat(` --identity ${options.identity}`)
}
if (options.upgrade) {
cmd = cmd.concat(` --upgrade y`)
}
const child: any = spawn(cmd, { cwd: process.cwd(), shell: true, stdio: 'inherit' })
child.on('close', (code: number) => {
process.exit(code)
Expand Down Expand Up @@ -215,6 +219,7 @@ program
.addOption(new Option('-n, --network <network name>', 'network name').choices(['kate', 'goldberg', 'local']).default('goldberg').makeOptionMandatory())
.option('-i, --identity <identity>', 'the identity to use')
.option('-c, --config <path to config file>', 'the config file to use')
.option('-u, --upgrade', 'upgrade the version of the light client')
.action(lc)

program
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@availproject/cli",
"version": "0.1.11",
"version": "0.1.12",
"description": "A simple CLI for Avail utilities",
"main": "index.js",
"bugs": "https://github.com/availproject/cli/issues",
Expand Down

0 comments on commit 697018d

Please sign in to comment.