Skip to content

Commit

Permalink
Fix update-release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok committed Nov 2, 2017
1 parent 480e824 commit 4b65199
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 13 deletions.
14 changes: 9 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ jobs:
for i in $(seq 1 5); do npm test && s=0 && break || s=$? && sleep 1; done; (exit $s)
- store_artifacts:
path: ~/.screenshots
path: ~/repo/.screenshots

test-without-oplog:
<<: *defaults
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
# cp -R .screenshots /tmp/screenshots

- store_artifacts:
path: ~/.screenshots
path: ~/repo/.screenshots

deploy:
<<: *defaults
Expand All @@ -243,7 +243,7 @@ jobs:
- run:
name: Install AWS cli
command: |
if [[ $CIRCLE_PULL_REQUESTS ]]; then exit 0; fi;
# if [[ $CIRCLE_PULL_REQUESTS ]]; then exit 0; fi;
sudo apt-get -y -qq update
sudo apt-get -y -qq install python3.4-dev
Expand All @@ -256,7 +256,7 @@ jobs:
- run:
name: Publish assets
command: |
if [[ $CIRCLE_PULL_REQUESTS ]]; then exit 0; fi;
# if [[ $CIRCLE_PULL_REQUESTS ]]; then exit 0; fi;
echo $PATH
export PATH=~/.local/bin:$PATH
Expand Down Expand Up @@ -285,7 +285,7 @@ workflows:
- test-without-oplog:
requires:
- build
- deploy:
- hold:
type: approval
requires:
- test-with-oplog
Expand All @@ -294,6 +294,10 @@ workflows:
branches:
only:
- develop
- circle-ci
tags:
only:
- "/^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?$/"
- deploy:
requires:
- hold
19 changes: 13 additions & 6 deletions .circleci/update-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
set -euo pipefail
IFS=$'\n\t'

if [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+ ]]; then
CHANNEL=candidate
elif [[ $CIRCLE_TAG ]]; then
CHANNEL=stable
else
CHANNEL=develop
CHANNEL=develop

if [[ "${CIRCLE_TAG+SET}" = "SET" ]]; then
echo 'if'
if [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+ ]]; then
CHANNEL=candidate
elif [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
CHANNEL=stable
fi
fi

if [[ $CHANNEL = "develop" ]]; then
RC_VERSION=0.59.0-develop
aws s3api put-object --acl public-read --website-redirect-location "https://download.rocket.chat/build/$ARTIFACT_NAME" --bucket download.rocket.chat --key "build/rocket.chat-$RC_VERSION.tgz"
fi

Expand Down
2 changes: 2 additions & 0 deletions .scripts/set-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const files = [
'./package.json',
'./.sandstorm/sandstorm-pkgdef.capnp',
'./.travis/snap.sh',
'./.circleci/snap.sh',
'./.circleci/update-releases.sh',
'./.docker/Dockerfile',
'./packages/rocketchat-lib/rocketchat.info'
];
Expand Down
2 changes: 1 addition & 1 deletion tests/chimp-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
// chai: false,
screenshotsOnError: true,
screenshotsPath: '.screenshots',
captureAllStepScreenshots: false,
captureAllStepScreenshots: true,
saveScreenshotsToDisk: true,
// // Note: With a large viewport size and captureAllStepScreenshots enabled,
// // you may run out of memory. Use browser.setViewportSize to make the
Expand Down
6 changes: 5 additions & 1 deletion tests/pageobjects/administration.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ class Administration extends Page {
element.waitForVisible(5000);
browser.pause(500);
const result = element.isVisible();
return result[0];
if (Array.isArray(result)) {
return result[0];
}

return result;
}

getUserFromList(user) {
Expand Down

0 comments on commit 4b65199

Please sign in to comment.