mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-08 07:29:44 -06:00
* run linter an all * add NPM package CI job * more steps for NPM package * start upload NPM package * more work on NPM package upload * testing upload * move purge cache to utils * add unique binary build and upload from CI * pass saved urls to test-binary job * allow CYPRESS_BINARY_VERSION to be an url right away * put uploaded urls into /tmp folder * use explicit json filenames * paths instead of path * testing cypress npm and binary * use NPM folder beta to store temp binary and package * refactor utils * set env vars and trigger other test projects * only test NPM and binary on develop branch * enable all jobs again
33 lines
846 B
JavaScript
33 lines
846 B
JavaScript
const minimist = require('minimist')
|
|
const la = require('lazy-ass')
|
|
const is = require('check-more-types')
|
|
const path = require('path')
|
|
|
|
/* eslint-disable no-console */
|
|
|
|
function getNameAndBinary (args = process.argv) {
|
|
const options = minimist(args)
|
|
|
|
la(is.unemptyString(options.npm),
|
|
'missing --npm option with package url', options)
|
|
la(is.unemptyString(options.binary),
|
|
'missing --binary option with binary url', options)
|
|
|
|
console.log('loading NPM url from', options.npm)
|
|
const npmUrl = require(path.resolve(options.npm)).url
|
|
la(is.url(npmUrl), 'not an url', npmUrl)
|
|
|
|
console.log('loading binary url from', options.binary)
|
|
const binaryUrl = require(path.resolve(options.binary)).url
|
|
la(is.url(binaryUrl), 'not an url', binaryUrl)
|
|
|
|
return {
|
|
npmUrl,
|
|
binaryUrl,
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
getNameAndBinary,
|
|
}
|