|
@@ -1,4 +1,10 @@
|
|
|
#!/usr/bin/env bash
|
|
|
+
|
|
|
+# This script is meant to be run on a dev's machine to update the version on
|
|
|
+# Yarn used by the monorepo. Its goal is to make sure that every mention of Yarn
|
|
|
+# version is updated, and it re-installs the plugins to make sure those are
|
|
|
+# up-to-date as well.
|
|
|
+
|
|
|
set -o pipefail
|
|
|
set -o errexit
|
|
|
set -o nounset
|
|
@@ -21,7 +27,9 @@ PLUGINS=$(awk '{ if ($1 == "spec:") print $2 }' .yarnrc.yml)
|
|
|
echo "$PLUGINS" | xargs -n1 -t corepack yarn plugin remove
|
|
|
|
|
|
cp package.json .yarn/cache/tmp.package.json
|
|
|
-sed "s#yarn\": \"$CURRENT_VERSION\"#yarn\": \"$LAST_VERSION\"#;s#\"yarn@$CURRENT_VERSION\"#\"yarn@$LAST_VERSION\"#" .yarn/cache/tmp.package.json > package.json
|
|
|
+sed "s#\"yarn\": \"$CURRENT_VERSION\"#\"yarn\": \"$LAST_VERSION\"#;s#\"yarn@$CURRENT_VERSION\"#\"yarn@$LAST_VERSION\"#" .yarn/cache/tmp.package.json > package.json
|
|
|
+cp packages/@uppy/companion/package.json .yarn/cache/tmp.package.json
|
|
|
+sed "s#\"yarn\": \"$CURRENT_VERSION\"#\"yarn\": \"$LAST_VERSION\"#;s#\"yarn@$CURRENT_VERSION\"#\"yarn@$LAST_VERSION\"#" .yarn/cache/tmp.package.json > packages/@uppy/companion/package.json
|
|
|
rm .yarn/cache/tmp.package.json
|
|
|
|
|
|
echo "$PLUGINS" | xargs -n1 -t corepack yarn plugin import
|