Skip to content

Instantly share code, notes, and snippets.

@kellyrob99
Last active September 23, 2015 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellyrob99/8e86227da5c8fd7d7a30 to your computer and use it in GitHub Desktop.
Save kellyrob99/8e86227da5c8fd7d7a30 to your computer and use it in GitHub Desktop.
publish all tgz files under the directory this is run to npm
@Grab(group = 'org.codehaus.gpars', module = 'gpars', version = '1.2.1')
import groovyx.gpars.*
def ant = new AntBuilder()
scanner = ant.fileScanner {
fileset(dir: ".") {
include(name: "**/*.tgz")
exclude(name: '**/\\.*/**')
}
}
GParsPool.withPool() {
scanner.eachParallel {
def process = ['npm', 'publish', it.absolutePath].execute()
process.consumeProcessOutput(System.out, System.err)
process.waitForOrKill(20000)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment