Skip to content

Commit

Permalink
feat: add no-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
QEDK committed Jun 9, 2024
1 parent 2bfa780 commit f841280
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const NETWORK_RPC_URLS: { kate: string, goldberg: string, local: string } = {
program
.name('avail')
.description('A simple CLI for Avail network utilities')
.version('0.1.12')
.version('0.1.13')

const sendTransferTx = async (api: any, to: string, amount: BN, keyring: KeyringPair, opt: Partial<any>, network: NetworkNames, wait: Wait): Promise<void> => {
return await new Promise((resolve, reject) => {
Expand Down Expand Up @@ -156,7 +156,7 @@ const lc = async (options: {
network: NetworkNames
config: string
identity: string,
upgrade: boolean,
noUpgrade: boolean,
}): Promise<void> => {
try {
let cmd = `curl -sL1 avail.sh | bash -s --`
Expand All @@ -168,7 +168,7 @@ const lc = async (options: {
if (typeof (options.identity) !== 'undefined') {
cmd = cmd.concat(` --identity ${options.identity}`)
}
if (options.upgrade) {
if (!options.noUpgrade) {
cmd = cmd.concat(` --upgrade y`)
}
const child: any = spawn(cmd, { cwd: process.cwd(), shell: true, stdio: 'inherit' })
Expand Down Expand Up @@ -226,7 +226,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')
.option('-nu, --no-upgrade', 'do not 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.12",
"version": "0.1.13",
"description": "A simple CLI for Avail utilities",
"main": "index.js",
"bugs": "https://github.com/availproject/cli/issues",
Expand Down

0 comments on commit f841280

Please sign in to comment.