Bo-Yi.Wu
95b01590dc
refactor: refactor host configuration handling
...
- Replace the iteration over `p.Config.Host` with `trimValues(p.Config.Host)`
- Replace `len(p.Config.Host)` with `len(hosts)`
- Replace iteration over `p.Config.Host` with `for _, host := range hosts`
- Add `trimValues` function to trim spaces and empty values of a string slice
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com >
2023-04-09 09:13:21 +08:00
Bo-Yi Wu
244b0a9e58
refactor: handling functions for cross-platform compatibility ( #166 )
...
- Change the `rmcmd` and `mkdircmd` functions to accept an OS parameter
- Remove `command_windows.go` file
- Modify `removeDestFile` and `Exec` functions to use the OS parameter
- Add OS detection logic to `removeAllDestFile` and `Exec` functions
- Modify `TestRemoveDestFile` function to use the OS parameter
fix https://github.com/appleboy/drone-scp/pull/119
2023-04-09 08:14:05 +08:00
Bo-Yi Wu
c309cf901d
chore(command): support windows ( #153 )
2023-02-03 17:12:57 +08:00
teutates
6d8c114979
feat(tar): add unlink-first flag ( #141 )
2022-12-29 21:15:21 +08:00
Bo-Yi.Wu
4a81a55a53
chore(lint): fix warning.
...
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com >
2022-12-29 21:10:16 +08:00
Bo-Yi Wu
731b24356e
chore(lint): check removeAllDestFile
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2021-10-23 18:30:17 +08:00
Bo-Yi Wu
4457897da5
chore: Support UseInsecureCipher ( #115 )
2020-05-24 14:17:43 +08:00
Bo-Yi Wu
f4fff01bdb
chore: missing Ciphers in removeAllDestFile
2020-05-21 23:09:53 +08:00
Bo-Yi Wu
2ff51f00ff
chore: support Fingerprint ( #114 )
2020-05-21 23:08:17 +08:00
Bo-Yi Wu
457861ab2a
chore(ssh): support Ciphers
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2020-05-04 10:27:02 +08:00
Bo-Yi Wu
bad565d475
update success message format.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2020-02-27 09:53:36 +08:00
Bo-Yi Wu
177625c6e7
chore: support passphrase ( #107 )
...
* chore: support passphrase
2020-01-20 22:34:16 +08:00
Bo-Yi Wu
c85ca1ffd2
feat(tar): add Overwrite flag ( #102 )
...
* feat(tar): add Overwrite flag
* chore: remove
* chore: output
* chore: output
2019-09-28 16:59:01 +08:00
Ivo Nunes
933b45bc15
Add variable to set temporary tar upload path ( #100 )
2019-09-28 16:36:05 +08:00
Bo-Yi Wu
15344d67ae
fix strip-components
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2019-09-28 16:30:07 +08:00
Bo-Yi Wu
cf9e6f260d
chore: debug command
2019-09-28 14:52:31 +08:00
Bo-Yi Wu
cfa325a8c4
refactor: Add args command
2019-09-28 14:40:28 +08:00
Bo-Yi Wu
da44b071c4
chore: switch finished to struct{} for zero allocate ( #96 )
2019-03-30 07:26:53 +08:00
Bo-Yi Wu
15bd1a11e4
chore: change command timeout flag ( #92 )
...
* chore: change command timeout flag
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
* docs: update setting
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
* doc: update readme.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2019-03-07 13:56:40 +08:00
Bo-Yi Wu
9cc27c6724
refactor: err check
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2019-03-06 11:05:15 +08:00
Bo-Yi Wu
fe8e5e3483
fix: remove check username exist. ( #91 )
2019-03-03 07:16:57 +08:00
Bo-Yi Wu
75d2ee1e10
fix missing exclude files ( #88 )
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2019-01-18 16:40:50 +08:00
Bo-Yi Wu
699675c8fa
add debug command. ( #87 )
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2019-01-18 16:06:22 +08:00
Bo-Yi Wu
d921289474
feat(ignore): support ignore list ( #86 )
...
fix #85
2019-01-18 15:12:36 +08:00
Bo-Yi Wu
4f7d31bd86
fix: missing tar config ( #83 )
2018-11-05 15:22:19 +08:00
natlibfi-arlehiko
d798a8cc75
Add TarExec parameter ( #82 )
...
Add TarExec parameter to provide an alternative tar-command (E.g. On old non-Linux systems it may be necessary to use gtar).
2018-11-05 15:11:00 +08:00
Bo-Yi Wu
7a88a784b2
refactor: hide domain info if only single domain in drone setting. ( #70 )
2017-05-15 17:16:21 +08:00
Bo-Yi Wu
13e681cc3b
refactor: wait group
2017-05-15 17:08:19 +08:00
Bo-Yi Wu
35c2f7a14c
feat: support strip components flag for tar command ( #65 )
...
Remove the specified number of leading path elements.
2017-04-30 23:18:22 +08:00
Bo-Yi Wu
8dba1e8e32
fix: quick fix. ( #63 )
2017-04-21 19:34:32 +08:00
Bo-Yi Wu
049263e847
refactor: show errors if set password and key at the same time ( #62 )
2017-04-21 16:38:43 +08:00
Bo-Yi Wu
88f5a95f3e
add scp error message ( #60 )
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2017-04-20 14:59:09 +08:00
Bo-Yi Wu
6aa6653378
update testing for remove single dest file. ( #55 )
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2017-03-25 23:05:13 +08:00
Bo-Yi Wu
d326bfe5a4
feat: update easyssh-proxy to 1.1.1 ( #54 )
2017-03-25 22:46:03 +08:00
Bo-Yi Wu
2ebb608269
feat: add color ( #53 )
2017-03-25 20:35:10 +08:00
Bo-Yi Wu
f223505d46
add copy error handle. ( #52 )
2017-03-25 20:19:07 +08:00
Bo-Yi Wu
b1ca6d49a2
feat: remove temp file if encounter errors. ( #51 )
2017-03-25 17:23:03 +08:00
Bo-Yi Wu
72c123f390
feat: Support scp files from proxy command. ( #47 )
...
* feat: Support scp files from proxy command.
2017-03-06 14:43:52 +08:00
Bo-Yi Wu
04c639cfa8
feat: upgrade to easyssh-proxy package. ( #45 )
...
* feat: upgrade to easyssh-proxy package.
* add command timeout flag
* upgrade easyssh to easyssh-proxy
2017-03-06 12:35:57 +08:00
Bo-Yi Wu
baa413d348
feat: support wildcard file list. ( #37 )
...
* feat: support wildcard file list.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2017-02-13 11:09:14 +08:00
Bo-Yi Wu
57d83dcfe0
feat: Add timeout flag. ( #26 )
2017-01-29 13:56:23 +08:00
Bo-Yi Wu
77dbb22aed
test: support windows testing. ( #21 )
2017-01-03 16:59:00 +08:00
Bo-Yi Wu
b69d758088
feat: support windows ( #20 )
2017-01-03 16:22:06 +08:00
Bo-Yi Wu
f987106211
support ssh agent.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2016-12-30 21:50:39 +08:00
Bo-Yi Wu
392c7c90e3
Add ssh testing.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2016-12-30 10:44:49 +08:00
Bo-Yi Wu
5a6851415d
Support key path.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2016-12-29 07:16:38 +08:00
Bo-Yi Wu
e4f3a180c8
add random string.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2016-12-28 15:56:17 +08:00
Bo-Yi Wu
f5d5e54a57
Support routines.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2016-12-27 14:33:21 +08:00
Bo-Yi Wu
91ef54d3d6
Support multiple target.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2016-12-19 16:29:38 +08:00
Bo-Yi Wu
cc1520024e
support multiple host
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2016-12-19 15:13:11 +08:00