Skip to content

Commit

Permalink
update: release v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Oct 20, 2023
1 parent 7a1ecd0 commit 8287b52
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 87 deletions.
168 changes: 84 additions & 84 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/solv",
"version": "1.4.0",
"version": "1.5.0",
"description": "Solana Validator CLI SOLV",
"main": "dist/index.js",
"repository": "https://github.com/EpicsDAO/solv",
Expand Down
21 changes: 21 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,24 @@ 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',
pubkey: 'pubkey',
message: 'Enter your SSH Public Key',
default() {
return 'xxxxxxxpubkeyxxxxxxxx'
},
},
])
const cmd = `echo "${answer.pubkey}" >> ${SSH_PUBKEY_PATH}`
spawnSync(cmd, { shell: true, stdio: 'inherit' })
console.log(`Successfully Created SSH Login Setting 🎉`)
})
}
3 changes: 2 additions & 1 deletion src/cli/setup/userPermissions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MOUNT_ROOT } from '@/config'
import { MOUNT_ROOT, VALIDATOR_STARTUP_SCRIPT } from '@/config'
import { spawnSync } from 'child_process'
import { existsSync } from 'fs'

Expand All @@ -7,6 +7,7 @@ export const setupPermissions = () => {
`sudo mkdir -p ${MOUNT_ROOT}`,
`sudo chown -R solv:solv ${MOUNT_ROOT}`,
`sudo chmod -R 755 ${MOUNT_ROOT}`,
`sudo chmod +x ${VALIDATOR_STARTUP_SCRIPT}`,
]
for (const line of cmds) {
if (line.includes('mkdir') && existsSync(MOUNT_ROOT)) continue
Expand Down
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,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: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { getSlot } from './cli/cron/getSlot'
import { statusCommands } from './cli/status'
import { configCommands } from './cli/config'
import { Logger } from './lib/logger'
import { scpCommands } from './cli/scp'
dotenv.config()

export const program = new Command()
Expand Down Expand Up @@ -53,6 +54,7 @@ async function main() {
checkCommpands()
installCommands()
mountCommands()
scpCommands()
await cronCommands()
await setupCommands()
await dfCommands()
Expand Down
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 = '1.4.0'
export const VERSION = '1.5.0'

0 comments on commit 8287b52

Please sign in to comment.