From 7b06ccc0dc8b7bab33ce477f64fd7cb92216a200 Mon Sep 17 00:00:00 2001 From: Serhii Leshchenko Date: Tue, 21 Sep 2021 18:15:27 +0300 Subject: [PATCH] fix: change the way we install yarn in .yarn/releases (#108) * fix: change the way we install yarn in .yarn/releases We can't use set-policies anymore since it relies on an ability to set GitHub token as query param while header now is required. See for more details https://github.com/yarnpkg/yarn/issues/7847 * fixup! fix: change the way we install yarn in .yarn/releases --- codeready-workspaces-dashboard/build/scripts/sync.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/codeready-workspaces-dashboard/build/scripts/sync.sh b/codeready-workspaces-dashboard/build/scripts/sync.sh index 14c93ac19f..35c608b024 100755 --- a/codeready-workspaces-dashboard/build/scripts/sync.sh +++ b/codeready-workspaces-dashboard/build/scripts/sync.sh @@ -88,8 +88,11 @@ fi # echo "Load https://raw.githubusercontent.com/redhat-developer/codeready-workspaces/${SCRIPTS_BRANCH}/dependencies/job-config.json [3]" configjson=$(curl -sSLo- https://raw.githubusercontent.com/redhat-developer/codeready-workspaces/${SCRIPTS_BRANCH}/dependencies/job-config.json) YARN_VERSION=$(echo "${configjson}" | jq -r --arg CRW_VERSION "${CRW_VERSION}" '.Other["YARN_VERSION"][$CRW_VERSION]'); -echo "Install Yarn $YARN_VERSION into .yarn/ ... " -yarn policies set-version ${YARN_VERSION} +YARN_TARGET_DIR=${TARGETDIR}/.yarn/releases +echo "Install Yarn $YARN_VERSION into $YARN_TARGET_DIR ... " +mkdir -p "${YARN_TARGET_DIR}" +curl -L "https://github.com/yarnpkg/yarn/releases/download/v${YARN_VERSION}/yarn-${YARN_VERSION}.js" -o "${YARN_TARGET_DIR}/yarn-${YARN_VERSION}.js" +chmod +x "${YARN_TARGET_DIR}/yarn-${YARN_VERSION}.js" pushd "${TARGETDIR}" >/dev/null