mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-01 20:19:58 -06:00
* adding S3 sdk * test binary folder * linting * before searching for binary * linting * grab folders in the given S3 prefix * grab folders in the given S3 prefix * find the last build * found last builds for commit * refactoring * add tests for upload dir name * create destination zip filename * copying S3 files * move s3 helpers into own object, prepare for testing * add realistic test * linting * chore: add documentation to DEPLOY.md file
30 lines
590 B
JavaScript
30 lines
590 B
JavaScript
/* eslint-disable no-console */
|
|
require('@packages/coffee/register')
|
|
require('@packages/ts/register')
|
|
|
|
const command = process.argv[2]
|
|
|
|
if (!command) {
|
|
console.error('Missing deploy command ⛔️')
|
|
process.exit(1)
|
|
}
|
|
|
|
const commands = require('./binary/index')
|
|
const fn = commands[command]
|
|
|
|
if (!fn) {
|
|
console.error('Invalid deploy command %s 🚫', command)
|
|
}
|
|
|
|
// TODO allow passing CLI arguments to each command
|
|
|
|
fn()
|
|
.then(() => {
|
|
return console.log('✅ %s completed', command)
|
|
})
|
|
.catch((err) => {
|
|
console.error('🔥 deploy error')
|
|
console.error(err)
|
|
process.exit(1)
|
|
})
|