mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-04 22:30:00 -06:00
move buildDir and distDir to meta file
This commit is contained in:
@@ -34,27 +34,6 @@ smokeTests = {
|
||||
}
|
||||
|
||||
module.exports = (platform, version) ->
|
||||
## returns a path into the /dist directory
|
||||
distDir = (args...) ->
|
||||
path.resolve("dist", platform, args...)
|
||||
|
||||
## returns a path into the /build directory
|
||||
## the output folder should look something like this
|
||||
## build/
|
||||
## <platform>/ = linux or darwin
|
||||
## ... platform-specific files
|
||||
buildDir = (args...) ->
|
||||
path.resolve("build", platform, args...)
|
||||
|
||||
## returns a path into the /build/*/app directory
|
||||
## specific to each platform
|
||||
buildAppDir = (args...) ->
|
||||
switch platform
|
||||
when "darwin"
|
||||
buildDir("Cypress.app", "Contents", "resources", "app", args...)
|
||||
when "linux"
|
||||
buildDir("resources", "app", args...)
|
||||
|
||||
cleanupPlatform = ->
|
||||
log("#cleanupPlatform", platform)
|
||||
|
||||
|
||||
@@ -144,8 +144,9 @@ deploy = {
|
||||
zip: ->
|
||||
# TODO only ask for built folder name
|
||||
options = @parseOptions(process.argv)
|
||||
askMissingOptions(['version', 'platform'])(options)
|
||||
askMissingOptions(['platform'])(options)
|
||||
.then (options) =>
|
||||
buildDir = meta.buildDir(options.platform)
|
||||
dest = path.resolve(zippedFilename(options.platform))
|
||||
zip.ditto(buildDir, dest)
|
||||
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
path = require("path")
|
||||
|
||||
## returns a path into the /build directory
|
||||
## the output folder should look something like this
|
||||
## build/
|
||||
## <platform>/ = linux or darwin
|
||||
## ... platform-specific files
|
||||
buildDir = (platform, args...) ->
|
||||
path.resolve("build", platform, args...)
|
||||
|
||||
## returns a path into the /dist directory
|
||||
distDir = (platform, args...) ->
|
||||
path.resolve("dist", platform, args...)
|
||||
|
||||
## returns a path into the /build/*/app directory
|
||||
## specific to each platform
|
||||
buildAppDir = (platform, args...) ->
|
||||
switch platform
|
||||
when "darwin"
|
||||
buildDir("Cypress.app", "Contents", "resources", "app", args...)
|
||||
when "linux"
|
||||
buildDir("resources", "app", args...)
|
||||
|
||||
module.exports = {
|
||||
distDir: path.join(process.cwd(), "dist")
|
||||
buildDir: path.join(process.cwd(), "build")
|
||||
buildDir
|
||||
distDir
|
||||
buildAppDir
|
||||
# distDir: path.join(process.cwd(), "dist")
|
||||
# buildDir: path.join(process.cwd(), "build")
|
||||
cacheDir: path.join(process.cwd(), "cache")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user