bin/copy-assets.js
function lastRelease() {
  const {stdout: branches} = exec(`git branch -a | grep 'origin/release'`)
  const releases = branches.
    split("\n")
    .map(b => b.replace(/remotes\/origin\//, '').trim())
    .filter(b => b.match(/^release-(\d+)$/))

  const ordered = sortBy(releases, r => parseInt(/\d+/.exec(r)[0], 10)  )
  return ordered[ordered.length -1];
}
function lastRelease() {
  const {stdout: branches} = exec(`git branch -a | grep 'origin/release'`)
  const releases = branches.
    split("\n")
    .map(b => b.replace(/remotes\/origin\//, '').trim())
    .filter(b => b.match(/^release-(\d+)$/))

  const ordered = sortBy(releases, r => parseInt(/\d+/.exec(r)[0], 10)  )
  return ordered[ordered.length -1];
}
function lastRelease ( ) { const { stdout : branches } = exec ( ` ` ) const releases = branches . split ( "\n" ) . map ( b => b . replace ( / remotes\/origin\/ / , '' ) . trim ( ) ) . filter ( b => b . match ( / ^release-(\d+)$ / ) ) const ordered = sortBy ( releases , r => parseInt ( / \d+ / . exec ( r ) [ 0 ] , 10 ) ) return ordered [ ordered . length - 1 ] ; }
searches the git branches for the last release branch
searches the git branches for the last release branch