From 9e9c47bdf5e5823d94e7b6bb86852430d0bdc195 Mon Sep 17 00:00:00 2001 From: Elisabeth Kulzer Date: Tue, 2 Jun 2020 13:52:14 +0200 Subject: [PATCH] Fix webapp checkout (#14730) --- .circleci/config.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9257e851d2..2f1aa76878 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,12 +27,13 @@ jobs: git checkout $CIRCLE_BRANCH || git checkout master export WEBAPP_GIT_COMMIT=$(git rev-parse HEAD) echo "$WEBAPP_GIT_COMMIT" - export CURL_FAILED=0 - curl -f -o ./dist.tar.gz https://pr-builds.mattermost.com/mattermost-webapp/commit/${WEBAPP_GIT_COMMIT}/mattermost-webapp.tar.gz && mkdir ./dist && tar -xvf ./dist.tar.gz -C ./dist --strip-components=1 || export CURL_FAILED=1 - if [ $CURL_FAILED -eq 1 ] + curl -f -o ./dist.tar.gz https://pr-builds.mattermost.com/mattermost-webapp/commit/${WEBAPP_GIT_COMMIT}/mattermost-webapp.tar.gz + if [[ $? == 0 ]] then - npm ci && cd node_modules/mattermost-redux && npm install && npm run build && cd ../.. && make build + mkdir ./dist && tar -xvf ./dist.tar.gz -C ./dist --strip-components=1 + else + npm ci && make build fi - persist_to_workspace: root: ~/mattermost