Skip to content

Commit

Permalink
update: release v2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Oct 20, 2023
1 parent 4654288 commit 2475461
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 81 deletions.
158 changes: 79 additions & 79 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epics-dao/solv2",
"version": "2.1.0",
"version": "2.1.1",
"description": "Solana Validator CLI SOLV2",
"main": "dist/index.js",
"repository": "https://github.com/EpicsDAO/solv2",
Expand Down
20 changes: 20 additions & 0 deletions src/cli/scp/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
MAINNET_VALIDATOR_KEYFILE,
SSH_PUBKEY_PATH,
TESTNET_VALIDATOR_KEYFILE,
VALIDATOR_VOTE_KEYFILE,
VALITATOR_AUTHORITY_KEYFILE,
Expand Down Expand Up @@ -48,4 +49,23 @@ export const scpCommands = () => {
console.log(`Successfully Exported - ${fileName} 🎉`)
}
})

scp
.command('create')
.alias('c')
.description('Create SSH Login Setting')
.action(async () => {
const answer = await inquirer.prompt<{ pubkey: string }>({
type: 'input',
name: 'pubkey',
message: 'Enter your SSH Public Key',
default() {
return 'xxxxxxxpubkeyxxxxxxxx'
},
})

const cmd = `mkdir -p /home/solv/.ssh && echo "${answer.pubkey}" >> ${SSH_PUBKEY_PATH}`
spawnSync(cmd, { shell: true, stdio: 'inherit' })
console.log(`Successfully Created SSH Login Setting 🎉`)
})
}
3 changes: 3 additions & 0 deletions src/cli/setup/startValidator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SOLV_ROOT, VALIDATOR_STARTUP_SCRIPT } from '@/config'
import { startValidatorSh } from '@/template/startValitatorSh'
import { spawnSync } from 'child_process'
import { existsSync, mkdirSync, writeFileSync } from 'fs'

export const startValidator = (fetchSnapshot = false) => {
Expand All @@ -9,6 +10,8 @@ export const startValidator = (fetchSnapshot = false) => {
mkdirSync(SOLV_ROOT, { recursive: true })
}
writeFileSync(`${VALIDATOR_STARTUP_SCRIPT}`, body, 'utf-8')
const cmd = `sudo chmod +x ${VALIDATOR_STARTUP_SCRIPT}`
spawnSync(cmd, { shell: true, stdio: 'inherit' })
} catch (error) {
throw new Error(`startValidator Error: ${error}`)
}
Expand Down
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ export const DEFAULT_VALIDATOR_VOTE_ACCOUNT_PUBKEY =
'76DafWkJ6pGK2hoD41HjrM4xTBhfKqrDYDazv13n5ir1'
export const DEFAULT_AUTHORITY_ACCOUNT_KEYFILE = './authority-keypair.json'

export const SSH_PUBKEY_PATH = '~/.ssh/authorized_keys'
export const SOLV_DISCORD_INVITE = 'https://discord.gg/y8tCMzPU9Y'
2 changes: 1 addition & 1 deletion src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '2.1.0'
export const VERSION = '2.1.1'

0 comments on commit 2475461

Please sign in to comment.