mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-14 10:08:06 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c674b51fcf | ||
|
|
298b6d6d83 | ||
|
|
931f5cc732 |
No files matched your search
@@ -32,7 +32,7 @@ jobs:
|
||||
pushd $DIR >/dev/null 2>&1
|
||||
# packages are ordered according to output of `lerna list --toposort`
|
||||
# https://github.com/expo/turtle-v2/pull/568
|
||||
for PACKAGE in "@expo/downloader" "@expo/eas-build-job" "@expo/logger" "@expo/template-file" "@expo/steps" "@expo/turtle-spawn" "@expo/build-tools"; do
|
||||
for PACKAGE in "@expo/downloader" "@expo/eas-build-job" "@expo/logger" "@expo/steps" "@expo/turtle-spawn" "@expo/build-tools"; do
|
||||
if grep -q $PACKAGE package.json; then
|
||||
echo "[$DIR] yarn --exact add $PACKAGE"
|
||||
yarn add --exact $PACKAGE
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
"@expo/rudder-sdk-node": "1.1.1",
|
||||
"@expo/spawn-async": "1.7.2",
|
||||
"@expo/steps": "1.0.265",
|
||||
"@expo/template-file": "1.0.260",
|
||||
"@expo/turtle-spawn": "1.0.260",
|
||||
"@hapi/boom": "10.0.1",
|
||||
"@sentry/node": "7.77.0",
|
||||
|
||||
@@ -21,7 +21,6 @@ PACKAGES=(
|
||||
"@expo/eas-build-job"
|
||||
"@expo/downloader"
|
||||
"@expo/logger"
|
||||
"@expo/template-file"
|
||||
"@expo/turtle-spawn"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { BuildContext } from '@expo/build-tools';
|
||||
import { Job, errors } from '@expo/eas-build-job';
|
||||
import templateFile from '@expo/template-file';
|
||||
import spawn from '@expo/turtle-spawn';
|
||||
import fs from 'fs-extra';
|
||||
import os from 'os';
|
||||
@@ -8,6 +7,8 @@ import path from 'path';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import config from './config';
|
||||
import { createInitGradle } from './templates/InitGradle';
|
||||
import { createYarnrcYml } from './templates/YarnrcYml';
|
||||
|
||||
class SystemDepsInstallError extends errors.UserFacingError {
|
||||
constructor(dependency: string) {
|
||||
@@ -27,23 +28,17 @@ export async function prepareRuntimeEnvironmentConfigFiles(): Promise<void> {
|
||||
// create ~/.npmrc
|
||||
await spawn('npm', ['config', 'set', 'registry', config.npmCacheUrl]);
|
||||
// create ~/.yarnrc.yml
|
||||
await templateFile(
|
||||
path.join(__dirname, '../src/templates/yarnrc.yml'),
|
||||
{
|
||||
URL: config.npmCacheUrl,
|
||||
},
|
||||
path.join(os.homedir(), '.yarnrc.yml')
|
||||
await fs.writeFile(
|
||||
path.join(os.homedir(), '.yarnrc.yml'),
|
||||
createYarnrcYml({ registryUrl: config.npmCacheUrl })
|
||||
);
|
||||
}
|
||||
|
||||
if (config.mavenCacheUrl) {
|
||||
await fs.mkdirp(path.join(os.homedir(), '.gradle'));
|
||||
await templateFile(
|
||||
path.join(__dirname, '../src/templates/init.gradle'),
|
||||
{
|
||||
URL: config.mavenCacheUrl,
|
||||
},
|
||||
path.join(os.homedir(), '.gradle/init.gradle')
|
||||
await fs.writeFile(
|
||||
path.join(os.homedir(), '.gradle/init.gradle'),
|
||||
createInitGradle({ mavenUrl: config.mavenCacheUrl })
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+19
-6
@@ -1,11 +1,13 @@
|
||||
export const createInitGradle = ({ mavenUrl }: { mavenUrl: string }) => `
|
||||
initscript {
|
||||
repositories {
|
||||
maven {
|
||||
url '{{URL}}/artifactory/libs-release'
|
||||
url '${mavenUrl}/artifactory/libs-release'
|
||||
if (it.hasProperty("allowInsecureProtocol")) {
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'https://plugins.gradle.org/m2/'
|
||||
}
|
||||
@@ -20,23 +22,28 @@ gradle.beforeSettings { settings ->
|
||||
settings.pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
url '{{URL}}/artifactory/libs-release'
|
||||
url '${mavenUrl}/artifactory/libs-release'
|
||||
if (it.hasProperty("allowInsecureProtocol")) {
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
}
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Also configure dependency resolution strategy for settings dependencies
|
||||
settings.dependencyResolutionManagement {
|
||||
repositories {
|
||||
maven {
|
||||
url '{{URL}}/artifactory/libs-release'
|
||||
url '${mavenUrl}/artifactory/libs-release'
|
||||
if (it.hasProperty("allowInsecureProtocol")) {
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
}
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,20 +52,25 @@ allprojects {
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
url '{{URL}}/artifactory/libs-release'
|
||||
url '${mavenUrl}/artifactory/libs-release'
|
||||
if (it.hasProperty("allowInsecureProtocol")) {
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
}
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url '{{URL}}/artifactory/libs-release'
|
||||
url '${mavenUrl}/artifactory/libs-release'
|
||||
if (it.hasProperty("allowInsecureProtocol")) {
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
}
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,3 +89,4 @@ class RemoveJcenterPlugin implements Plugin<Gradle> {
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -0,0 +1,6 @@
|
||||
export const createYarnrcYml = ({ registryUrl }: { registryUrl: string }) => `
|
||||
unsafeHttpWhitelist:
|
||||
- "*"
|
||||
npmRegistryServer: "${registryUrl}"
|
||||
enableImmutableInstalls: false
|
||||
`;
|
||||
@@ -1,4 +0,0 @@
|
||||
unsafeHttpWhitelist:
|
||||
- "*"
|
||||
npmRegistryServer: "{{URL}}"
|
||||
enableImmutableInstalls: false
|
||||
Reference in new issue
Block a user