Skip to content

1.0.3

Choose a tag to compare

@int128 int128 released this 06 Feb 17:09
· 1068 commits to master since this release

Released on 2015-02-07

  • #142 Bump to Groovy SSH 1.0.5
  • New Feature
    • Add the new syntax to get the content of the remote file.
  • Kaizen
    • Change syntax of put() for symmetric design.

New feature

get() supports following options now.

// specify a file path or File object
get from: '/remote/file', into: 'local_file'
get from: '/remote/file', into: buildDir

// specify an output stream
file.withOutputStream { stream ->
  get from: '/remote/file', into: stream
}

// get content as a string
def text = get from: '/remote/file'

No backward compatible change

Some syntax of put() is replaced with from:.

Old syntax:

put file: 'test.txt', into: '/tmp'
put file: new File('test.txt'), into: '/tmp'
put files: [new File('test.txt')], into: '/tmp'
put stream: stream, into: '/tmp/test.dat'

is replaced with new syntax:

put from: 'test.txt', into: '/tmp'
put from: new File('test.txt'), into: '/tmp'
put from: [new File('test.txt')], into: '/tmp'
put from: stream, into: '/tmp/test.dat'

See the user guide for details.