-
-
Save kellyrob99/8e86227da5c8fd7d7a30 to your computer and use it in GitHub Desktop.
publish all tgz files under the directory this is run to npm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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