Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
provision: Do not require that no other yarn precedes us in $PATH.
Lalit112df91fbdbf
diff --git a/scripts/lib/install-yarn b/scripts/lib/install-yarnindex 46f05808b67..c4574289983 100755--- a/scripts/lib/install-yarn+++ b/scripts/lib/install-yarn@@ -8,9 +8,7 @@ tarball="yarn-$version.tgz"check_version() {# Reading the version of Yarn from its package.json is much faster# than running yarn --version.- link="$(command -v yarn)" \- && [ "$link" -ef /srv/zulip-yarn/bin/yarn ] \- && current_version="$(jq -r '.version' /srv/zulip-yarn/package.json)" \+ current_version="$(jq -r '.version' /srv/zulip-yarn/package.json)" \&& [ "$current_version" = "$version" ]}@@ -23,6 +21,5 @@ if ! check_version; thenrm -rf /srv/zulip-yarnmkdir /srv/zulip-yarntar -xzf "$tarball" --no-same-owner --strip-components=1 -C /srv/zulip-yarn- ln -nsf /srv/zulip-yarn/bin/yarn /usr/bin/yarncheck_versionfidiff --git a/tools/ci/production-build b/tools/ci/production-buildindex bedfec147ef..a524afec753 100755--- a/tools/ci/production-build+++ b/tools/ci/production-build@@ -44,8 +44,10 @@ cp -a \/tmp/production-build# Check that webpack bundles use only ES2019 syntax.+# Use the yarn binary installed by tools/provision.+YARN="/srv/zulip-yarn/bin/yarn"tar -C /tmp -xzf /tmp/production-build/zulip-server-test.tar.gz zulip-server-test/prod-static/serve/webpack-bundles(GLOBIGNORE=/tmp/zulip-server-test/prod-static/serve/webpack-bundles/katex-cli.js- yarn run es-check es2019 /tmp/zulip-server-test/prod-static/serve/webpack-bundles/*.js+ $YARN run es-check es2019 /tmp/zulip-server-test/prod-static/serve/webpack-bundles/*.js)diff --git a/tools/setup/optimize-svg b/tools/setup/optimize-svgindex 0ac5f67c02b..23efbb42955 100755--- a/tools/setup/optimize-svg+++ b/tools/setup/optimize-svg@@ -42,6 +42,7 @@ if [ "$#" -gt 0 ]; thenfiZULIP_PATH="$(readlink -f "$(dirname "$0")"/../..)"+YARN="/srv/zulip-yarn/bin/yarn"if [ -n "$CHECK_UNOPTIMIZED" ]; thenif [ "$(node_modules/.bin/svgo -f static/images/integrations/logos | grep -o '\.[0-9]% = ' | wc -l)" -ge 1 ]; then@@ -52,6 +53,6 @@ if [ -n "$CHECK_UNOPTIMIZED" ]; thenecho "SUCCESS: SVG files in static/images/integrations/logos are all optimized!"fielse- yarn run svgo -q -f static/images/integrations/logos+ $YARN run svgo -q -f static/images/integrations/logos"$ZULIP_PATH"/tools/setup/generate_integration_bots_avatars.pyfi