aboutsummaryrefslogtreecommitdiffstats
path: root/build/external_resources
diff options
context:
space:
mode:
authorv-homyakov <v-homyakov@yandex-team.ru>2022-06-15 21:16:32 +0300
committerv-homyakov <v-homyakov@yandex-team.ru>2022-06-15 21:16:32 +0300
commit6c64f9cb3a57130c2c3cddc0a42a85fd41698c20 (patch)
treecac1f4416cf6846cbc6c0dd29a70145a3ef1c8af /build/external_resources
parent3591e3bbb489851930d8202b55551c1369d423fa (diff)
downloadydb-6c64f9cb3a57130c2c3cddc0a42a85fd41698c20.tar.gz
FEI-24069: ya make + frontend: поддержка eslint
ref:e80bfd2c07b374fcedc5dc4c2bd7c1e9fc65ba93
Diffstat (limited to 'build/external_resources')
-rw-r--r--build/external_resources/eslint/create-sandbox-resource.sh33
-rw-r--r--build/external_resources/eslint/readme.md13
2 files changed, 46 insertions, 0 deletions
diff --git a/build/external_resources/eslint/create-sandbox-resource.sh b/build/external_resources/eslint/create-sandbox-resource.sh
new file mode 100644
index 0000000000..33525c8ca4
--- /dev/null
+++ b/build/external_resources/eslint/create-sandbox-resource.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+set -e
+
+ESLINT_VERSION="7.27.0"
+PACKAGES="eslint@$ESLINT_VERSION @yandex-int/lint@1.15.0"
+
+echo "Creating temporary directory…"
+TMP_DIR=$(mktemp -d)
+cd $TMP_DIR
+echo "Temporary directory ${TMP_DIR} is created"
+
+echo "Installing packages…"
+ESLINT_DIR="eslint-resource"
+mkdir $ESLINT_DIR && cd $ESLINT_DIR
+npm init -y
+npm install --save-dev --save-exact --registry=https://npm.yandex-team.ru ${PACKAGES}
+echo "Packages are installed"
+
+echo "Creating archive…"
+RESOURCE_DIR="node_modules"
+ARCHIVE="eslint-$ESLINT_VERSION.tar.gz"
+tar --create --gzip --file=$ARCHIVE $RESOURCE_DIR
+echo "Archive $(pwd)/$ARCHIVE is created"
+
+echo "Uploading file ${ARCHIVE}…"
+DESCRIPTION="Bundle for https://st.yandex-team.ru/FEI-24069. Content: ${PACKAGES}."
+ya upload $ARCHIVE -d="${DESCRIPTION}" --ttl="inf" --attr="eslint=${ESLINT_VERSION}"
+echo "File $ARCHIVE is uploaded"
+
+echo "Cleaning up…"
+rm -rf $TMP_DIR
+
+echo "Done"
diff --git a/build/external_resources/eslint/readme.md b/build/external_resources/eslint/readme.md
new file mode 100644
index 0000000000..73208679ca
--- /dev/null
+++ b/build/external_resources/eslint/readme.md
@@ -0,0 +1,13 @@
+# eslint bundle
+
+Ресурс должен быть tar.gz-архивом с пакетами `eslint` и `@yandex-int/lint` и всеми транзитивными зависимостями. Структура:
+
+```
+node_modules/
+ .bin/
+ eslint
+ @yandex-int/
+ lint/
+ eslint/
+ остальные пакеты, нужные для eslint
+```