Skip to content

Commit

Permalink
fix: change the way we install yarn in .yarn/releases (#108)
Browse files Browse the repository at this point in the history
* 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 yarnpkg/yarn#7847

* fixup! fix: change the way we install yarn in .yarn/releases
  • Loading branch information
sleshchenko committed Sep 21, 2021
1 parent fcc409a commit 7b06ccc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions codeready-workspaces-dashboard/build/scripts/sync.sh
Expand Up @@ -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

Expand Down

0 comments on commit 7b06ccc

Please sign in to comment.