Skip to content

Commit 2787fb7

Browse files
authored
move non-dependency parts of ioctl and correct readme (iotexproject#1806)
1 parent 9f8af6d commit 2787fb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+130
-130
lines changed

.circleci/config.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,22 @@ jobs:
114114
working_directory: ~/iotex-core
115115
steps:
116116
- checkout
117-
- run: cd ioctl/ && ./buildcli.sh
117+
- run: cd tools/ioctl/ && ./buildcli.sh
118118
- run: cd tools/actioninjector.v2/ && ./build_injector.sh
119-
- run:
119+
- run:
120120
name: build bin put s3 (unstable) or github (release)
121121
command: |
122122
if [ "${VERSION}" ]; then
123123
echo "Put bin to github release ${VERSION}"
124124
go get -u github.com/tcnksm/ghr
125125
arg="-t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${VERSION}"
126126
echo $arg
127-
ghr $arg ioctl/release/
127+
ghr $arg tools/ioctl/release/
128128
ghr $arg tools/actioninjector.v2/release/
129129
else
130130
sudo apt-get install python python-pip
131131
sudo pip install awscli
132-
aws s3 sync ioctl/release/ ${S3_BUCKET_DIR}
132+
aws s3 sync tools/ioctl/release/ ${S3_BUCKET_DIR}
133133
aws s3 sync tools/actioninjector.v2/release/ ${S3_BUCKET_DIR}
134134
fi
135135
@@ -150,7 +150,7 @@ jobs:
150150
- restore_cache:
151151
keys:
152152
- go-mod-v1-{{ checksum "go.sum" }}
153-
- run:
153+
- run:
154154
name: go mod
155155
command: |
156156
export PATH=$PATH:/usr/local/go/bin
@@ -166,8 +166,8 @@ jobs:
166166
export GOPATH=~/go
167167
export GOROOT="/usr/local/go"
168168
export PATH=$PATH:$GOPATH/bin:$PATH:$GOROOT/bin
169-
cd ioctl/ && ./buildcli.sh
170-
cd ../tools/actioninjector.v2/ && ./build_injector.sh
169+
cd tools/ioctl/ && ./buildcli.sh
170+
cd ../actioninjector.v2/ && ./build_injector.sh
171171
- run:
172172
name: build bin put s3 (unstable) or github (release)
173173
command: |
@@ -176,11 +176,11 @@ jobs:
176176
go get -u github.com/tcnksm/ghr
177177
arg="-t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${VERSION}"
178178
echo $arg
179-
ghr $arg ioctl/release/
179+
ghr $arg tools/ioctl/release/
180180
ghr $arg tools/actioninjector.v2/release/
181181
else
182182
sudo pip install awscli
183-
aws s3 sync ioctl/release/ ${S3_BUCKET_DIR}
183+
aws s3 sync tools/ioctl/release/ ${S3_BUCKET_DIR}
184184
aws s3 sync tools/actioninjector.v2/release/ ${S3_BUCKET_DIR}
185185
fi
186186

ioctl/cmd/account/accountexport.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var (
3030

3131
// accountExportCmd represents the account export command
3232
var accountExportCmd = &cobra.Command{
33-
Use: config.TranslateInLang(exportCmdShorts, config.UILanguage),
33+
Use: config.TranslateInLang(exportCmdUses, config.UILanguage),
3434
Short: config.TranslateInLang(exportCmdShorts, config.UILanguage),
3535
Args: cobra.ExactArgs(1),
3636
RunE: func(cmd *cobra.Command, args []string) error {

ioctl/cmd/action/actiondeposit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var (
3030

3131
// actionDepositCmd represents the action deposit command
3232
var actionDepositCmd = &cobra.Command{
33-
Use: config.TranslateInLang(deployCmdUses, config.UILanguage),
33+
Use: config.TranslateInLang(depositCmdUses, config.UILanguage),
3434
Short: config.TranslateInLang(depositCmdShorts, config.UILanguage),
3535
Args: cobra.RangeArgs(1, 2),
3636
RunE: func(cmd *cobra.Command, args []string) error {

ioctl/cmd/action/stakeadd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var (
2828
// stakeAddCmd represents the stake add command
2929
var stakeAddCmd = &cobra.Command{
3030
Use: config.TranslateInLang(addCmdUses, config.UILanguage),
31-
Short: config.TranslateInLang(actionCmdShorts, config.UILanguage),
31+
Short: config.TranslateInLang(addCmdShorts, config.UILanguage),
3232
Args: cobra.RangeArgs(2, 3),
3333
RunE: func(cmd *cobra.Command, args []string) error {
3434
cmd.SilenceUsage = true

ioctl/cmd/node/nodedelegate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (m *nextDelegatesMessage) String() string {
143143

144144
func init() {
145145
nodeDelegateCmd.Flags().Uint64VarP(&epochNum, "epoch-num", "e", 0,
146-
config.TranslateInLang(flagEndpointUsages, config.UILanguage))
146+
config.TranslateInLang(flagEpochNumUsages, config.UILanguage))
147147
nodeDelegateCmd.Flags().BoolVarP(&nextEpoch, "next-epoch", "n", false,
148148
config.TranslateInLang(flagNextEpochUsages, config.UILanguage))
149149
nodeStatus = map[bool]string{true: "active", false: ""}

ioctl/README.md renamed to tools/ioctl/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ ioctl is a command-line interface for interacting with IoTeX blockchain.
4646
* [ioctl version](readme/ioctl_version.md) - Print the version of ioctl and node
4747
* [ioctl xrc20](readme/ioctl_xrc20.md) - Support ERC20 standard command-line from ioctl
4848

49-
###### Auto generated by ioctl on 27-Nov-2019
49+
###### Auto generated by ioctl on 17-Dec-2019
File renamed without changes.

ioctl/readme/docgen.go renamed to tools/ioctl/readme/docgen.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func main() {
2323
if err != nil {
2424
log.Fatal(err)
2525
}
26-
ioctlPath = filepath.Join(corePath, "ioctl")
26+
ioctlPath = filepath.Join(corePath, "tools", "ioctl")
2727

2828
preString := `# ioctl
2929
ioctl is a command-line interface for interacting with IoTeX blockchains.
@@ -62,7 +62,7 @@ specific release so install-cli.sh can download them.
6262
return ""
6363
}
6464

65-
path := os.Getenv("GOPATH") + "/src/github.com/iotexproject/iotex-core/ioctl/readme"
65+
path := filepath.Join(ioctlPath, "readme")
6666
err = GenMarkdownTreeCustom(cmd.RootCmd, path, filePrepender, linkHandler)
6767
if err != nil {
6868
log.Fatal(err)

ioctl/readme/ioctl_account.md renamed to tools/ioctl/readme/ioctl_account.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Manage accounts of IoTeX blockchain
99
### Options
1010

1111
```
12-
--endpoint string set endpoint for once (default "api.iotex.one:443")
12+
--endpoint string set endpoint for once
1313
-h, --help help for account
1414
--insecure insecure connection for once
1515
```
@@ -38,4 +38,4 @@ Manage accounts of IoTeX blockchain
3838
* [ioctl account update](ioctl_account_update.md) - Update password for IoTeX account
3939
* [ioctl account verify](ioctl_account_verify.md) - Verify IoTeX public key and address by private key
4040

41-
###### Auto generated by ioctl on 27-Nov-2019
41+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_balance.md renamed to tools/ioctl/readme/ioctl_account_balance.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account balance [ALIAS|ADDRESS] [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account balance [ALIAS|ADDRESS] [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_create.md renamed to tools/ioctl/readme/ioctl_account_create.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ioctl account create [flags]
2020
### Options inherited from parent commands
2121

2222
```
23-
--endpoint string set endpoint for once (default "api.iotex.one:443")
23+
--endpoint string set endpoint for once
2424
--insecure insecure connection for once
2525
-o, --output-format string output format
2626
```
@@ -29,4 +29,4 @@ ioctl account create [flags]
2929

3030
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3131

32-
###### Auto generated by ioctl on 27-Nov-2019
32+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_createadd.md renamed to tools/ioctl/readme/ioctl_account_createadd.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account createadd ALIAS [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account createadd ALIAS [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_delete.md renamed to tools/ioctl/readme/ioctl_account_delete.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account delete [ALIAS|ADDRESS] [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account delete [ALIAS|ADDRESS] [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_ethaddr.md renamed to tools/ioctl/readme/ioctl_account_ethaddr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account ethaddr (ALIAS|IOTEX_ADDRESS|ETH_ADDRESS) [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account ethaddr (ALIAS|IOTEX_ADDRESS|ETH_ADDRESS) [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_export.md renamed to tools/ioctl/readme/ioctl_account_export.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account export (ALIAS|ADDRESS) [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account export (ALIAS|ADDRESS) [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_exportpublic.md renamed to tools/ioctl/readme/ioctl_account_exportpublic.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account exportpublic (ALIAS|ADDRESS) [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account exportpublic (ALIAS|ADDRESS) [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_getVotes.md renamed to tools/ioctl/readme/ioctl_account_getVotes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account getVotes VOTEE HEIGHT OFFSET LIMIT [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account getVotes VOTEE HEIGHT OFFSET LIMIT [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_import.md renamed to tools/ioctl/readme/ioctl_account_import.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Import IoTeX private key or keystore into wallet
1515
### Options inherited from parent commands
1616

1717
```
18-
--endpoint string set endpoint for once (default "api.iotex.one:443")
18+
--endpoint string set endpoint for once
1919
--insecure insecure connection for once
2020
-o, --output-format string output format
2121
```
@@ -26,4 +26,4 @@ Import IoTeX private key or keystore into wallet
2626
* [ioctl account import key](ioctl_account_import_key.md) - Import IoTeX private key into wallet
2727
* [ioctl account import keystore](ioctl_account_import_keystore.md) - Import IoTeX keystore into wallet
2828

29-
###### Auto generated by ioctl on 27-Nov-2019
29+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_import_key.md renamed to tools/ioctl/readme/ioctl_account_import_key.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account import key ALIAS [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account import key ALIAS [flags]
2828

2929
* [ioctl account import](ioctl_account_import.md) - Import IoTeX private key or keystore into wallet
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_import_keystore.md renamed to tools/ioctl/readme/ioctl_account_import_keystore.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account import keystore ALIAS FILEPATH [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account import keystore ALIAS FILEPATH [flags]
2828

2929
* [ioctl account import](ioctl_account_import.md) - Import IoTeX private key or keystore into wallet
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_list.md renamed to tools/ioctl/readme/ioctl_account_list.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account list [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account list [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_nonce.md renamed to tools/ioctl/readme/ioctl_account_nonce.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account nonce [ALIAS|ADDRESS] [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account nonce [ALIAS|ADDRESS] [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_sign.md renamed to tools/ioctl/readme/ioctl_account_sign.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ioctl account sign MESSAGE [-s SIGNER] [flags]
2020
### Options inherited from parent commands
2121

2222
```
23-
--endpoint string set endpoint for once (default "api.iotex.one:443")
23+
--endpoint string set endpoint for once
2424
--insecure insecure connection for once
2525
-o, --output-format string output format
2626
```
@@ -29,4 +29,4 @@ ioctl account sign MESSAGE [-s SIGNER] [flags]
2929

3030
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3131

32-
###### Auto generated by ioctl on 27-Nov-2019
32+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_update.md renamed to tools/ioctl/readme/ioctl_account_update.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account update [ALIAS|ADDRESS] [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account update [ALIAS|ADDRESS] [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_account_verify.md renamed to tools/ioctl/readme/ioctl_account_verify.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ioctl account verify [flags]
1919
### Options inherited from parent commands
2020

2121
```
22-
--endpoint string set endpoint for once (default "api.iotex.one:443")
22+
--endpoint string set endpoint for once
2323
--insecure insecure connection for once
2424
-o, --output-format string output format
2525
```
@@ -28,4 +28,4 @@ ioctl account verify [flags]
2828

2929
* [ioctl account](ioctl_account.md) - Manage accounts of IoTeX blockchain
3030

31-
###### Auto generated by ioctl on 27-Nov-2019
31+
###### Auto generated by ioctl on 17-Dec-2019

ioctl/readme/ioctl_action.md renamed to tools/ioctl/readme/ioctl_action.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Manage actions of IoTeX blockchain
99
### Options
1010

1111
```
12-
--endpoint string set endpoint for once (default "api.iotex.one:443")
12+
--endpoint string set endpoint for once
1313
-h, --help help for action
1414
--insecure insecure connection for once
1515
```
@@ -25,11 +25,11 @@ Manage actions of IoTeX blockchain
2525
* [ioctl](../README.md) - Command-line interface for IoTeX blockchain
2626
* [ioctl action claim](ioctl_action_claim.md) - Claim rewards from rewarding fund
2727
* [ioctl action deploy](ioctl_action_deploy.md) - Deploy smart contract on IoTeX blockchain
28-
* [ioctl action deposit](ioctl_action_deposit.md) - Deposit rewards from rewarding fund
28+
* [ioctl action deposit](ioctl_action_deposit.md) - Deposit rewards to rewarding fund
2929
* [ioctl action hash](ioctl_action_hash.md) - Get action by hash
3030
* [ioctl action invoke](ioctl_action_invoke.md) - Invoke smart contract on IoTeX blockchain
3131
* [ioctl action read](ioctl_action_read.md) - read smart contract on IoTeX blockchain
3232
* [ioctl action sendraw](ioctl_action_sendraw.md) - Send raw action on IoTeX blokchain
3333
* [ioctl action transfer](ioctl_action_transfer.md) - Transfer tokens on IoTeX blokchain
3434

35-
###### Auto generated by ioctl on 27-Nov-2019
35+
###### Auto generated by ioctl on 17-Dec-2019

0 commit comments

Comments
 (0)