From 43161731fa66f63598ef3ed44da97f18bb33c0a4 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Mon, 21 Oct 2019 15:14:23 +0200 Subject: [PATCH] fix bash to not build webapp when it is already built (#12834) --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e32e9e70a8..3481f0519a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,7 +25,9 @@ jobs: git checkout $CIRCLE_BRANCH || git checkout master export WEBAPP_GIT_COMMIT=$(git rev-parse HEAD) echo "$WEBAPP_GIT_COMMIT" - curl -f -o ./dist.tar.gz https://releases.mattermost.com/mattermost-webapp/commit/${WEBAPP_GIT_COMMIT}/mattermost-webapp.tar.gz && mkdir ./dist && tar -xvf ./dist.tar.gz -C ./dist --strip-components=1 || echo "curl failed" && export CURL_FAILED=1 + export CURL_FAILED=0 + curl -f -o ./dist.tar.gz https://releases.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 ] then npm ci && cd node_modules/mattermost-redux && npm install && npm run build && cd ../.. && make build