Skip to content

Commit

Permalink
test: pass -e CI -e TRAVIS
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed May 31, 2016
1 parent c2c3ef6 commit 1f4f621
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ install:

script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run test ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --rm -v ${PWD}:/project -v ~/.electron:/root/.electron electronuserland/electron-builder:wine /test.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --rm -e CI -e TRAVIS -v ${PWD}:/project -v ~/.electron:/root/.electron electronuserland/electron-builder:wine /test.sh ; fi

after_success:
- node out/cleanup.js
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- sudo apt-get install git-lfs=1.2.0
- ssh [email protected] git-lfs-authenticate $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git download
- git lfs pull
- docker run --rm -v ${PWD}:/project -v ~/.electron:/root/.electron -v ~/.cache:/root/.cache electronuserland/electron-builder:wine /test.sh
- docker run --rm -e CI -e TRAVIS -v ${PWD}:/project -v ~/.electron:/root/.electron -v ~/.cache:/root/.cache electronuserland/electron-builder:wine /test.sh

test:
override:
Expand Down
2 changes: 1 addition & 1 deletion src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export async function build(rawOptions?: CliOptions): Promise<void> {
options.publish = "onTag"
isPublishOptionGuessed = true
}
else if ((process.env.TRAVIS || process.env.APPVEYOR || process.env.CIRCLECI || "").toLowerCase() === "true") {
else if ((process.env.CI || "").toLowerCase() === "true") {
log("CI detected, so artifacts will be published if draft release exists")
options.publish = "onTagOrDraft"
isPublishOptionGuessed = true
Expand Down
7 changes: 4 additions & 3 deletions test/src/helpers/avaEx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,18 @@ Object.defineProperties(test, {
},
"ifDevOrWinCi": {
get: function () {
return !process.env.CI || process.platform === "win32" ? this : this.skip
console.log(process.env)
return process.env.CI == null || process.platform === "win32" ? this : this.skip
}
},
"ifDevOrLinuxCi": {
get: function () {
return !process.env.CI || process.platform === "linux" ? this : this.skip
return process.env.CI == null || process.platform === "linux" ? this : this.skip
}
},
"ifWinCi": {
get: function () {
return process.env.CI && process.platform === "win32" ? this : this.skip
return (process.env.CI || "").toLowerCase() === "true" && process.platform === "win32" ? this : this.skip
}
}
})
Expand Down

0 comments on commit 1f4f621

Please sign in to comment.