root: add release tasks to bump cypress server manifest [skip ci]

This commit is contained in:
Brian Mann
2017-10-04 18:47:59 -04:00
parent 720b78f9b0
commit d657b3545f
6 changed files with 30 additions and 13 deletions

View File

@@ -34,7 +34,7 @@
"binary-deploy": "node ./scripts/binary.js deploy",
"binary-purge": "node ./scripts/binary.js purge-version",
"binary-deploy-linux": "./scripts/build-linux-binary.sh",
"release": "gulp release",
"binary-release": "node ./scripts/binary.js release",
"test-mocha": "mocha --reporter spec scripts/spec.js",
"test-mocha-snapshot": "mocha scripts/mocha-snapshot-spec.js"
},

View File

@@ -67,8 +67,17 @@ remapProjects = (projectsByProvider) ->
PROJECTS = remapProjects(_PROVIDERS)
getCiConfig = ->
## gleb: fix this plzzzzzz
old = process.cwd()
process.chdir(__dirname)
key = "support/.ci.json"
config = configFromEnvOrJsonFile(key)
process.chdir(old)
if !config
console.error('⛔️ Cannot find CI credentials')
console.error('Using @cypress/env-or-json-file module')

View File

@@ -102,12 +102,12 @@ deploy = {
success("Release Complete")
.catch (err) ->
fail("Release Failed")
reject(err)
throw err
if v = options.version
release(v)
else
ask.whichRelease(meta.distDir)
ask.whichRelease(meta.distDir(""))
.then(release)
build: (options) ->

View File

@@ -54,7 +54,7 @@ module.exports = {
}
}
src = path.join(meta.buildDir, "manifest.json")
src = path.resolve("manifest.json")
fs.outputJsonAsync(src, obj).return(src)
s3Manifest: (version) ->
@@ -65,8 +65,13 @@ module.exports = {
headers = {}
headers["Cache-Control"] = "no-cache"
manifest = null
new Promise (resolve, reject) =>
@createRemoteManifest(aws.folder, version).then (src) ->
@createRemoteManifest(aws.folder, version)
.then (src) ->
manifest = src
gulp.src(src)
.pipe rename (p) ->
p.dirname = aws.folder + "/" + p.dirname
@@ -76,6 +81,8 @@ module.exports = {
.pipe awspublish.reporter()
.on "error", reject
.on "end", resolve
.finally ->
fs.removeAsync(manifest)
toS3: ({zipFile, version, platform}) ->
console.log("#uploadToS3 ⏳")

View File

@@ -11,9 +11,17 @@ Promise = require("bluebird")
konfig = require("../../../packages/server/lib/konfig")
getS3Credentials = () ->
key = path.join('scripts', 'binary', 'support', '.aws-credentials.json')
## gleb: fix this plzzzzzz
old = process.cwd()
process.chdir(path.resolve(__dirname, '..'))
key = path.join('support', '.aws-credentials.json')
config = configFromEnvOrJsonFile(key)
process.chdir(old)
if !config
console.error('⛔️ Cannot find AWS credentials')
console.error('Using @cypress/env-or-json-file module')

View File

@@ -1,7 +0,0 @@
deploy = require("./deploy")
gulp.task "release", deploy.release
gulp.task "deploy", deploy.deploy
gulp.task "bump", deploy.bump