From f38b626d3d1e786b5f62f49f8654061b07587e05 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Thu, 4 Apr 2024 12:46:00 -0700 Subject: [PATCH] fix(build): avoid nested gradle commands (#10198) --- metadata-ingestion-modules/airflow-plugin/build.gradle | 4 ++-- metadata-ingestion-modules/airflow-plugin/scripts/release.sh | 2 +- metadata-ingestion-modules/dagster-plugin/build.gradle | 2 +- metadata-ingestion-modules/dagster-plugin/scripts/release.sh | 2 +- metadata-ingestion/build.gradle | 2 +- metadata-ingestion/scripts/release.sh | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/metadata-ingestion-modules/airflow-plugin/build.gradle b/metadata-ingestion-modules/airflow-plugin/build.gradle index b006b12d75a7ec..e2e624a74e4129 100644 --- a/metadata-ingestion-modules/airflow-plugin/build.gradle +++ b/metadata-ingestion-modules/airflow-plugin/build.gradle @@ -113,10 +113,10 @@ task cleanPythonCache(type: Exec) { commandLine 'bash', '-c', "find src -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete" } -task buildWheel(type: Exec, dependsOn: [environmentSetup, cleanPythonCache]) { +task buildWheel(type: Exec, dependsOn: [environmentSetup]) { commandLine 'bash', '-c', "source ${venv_name}/bin/activate && set -x && " + - 'uv pip install build && RELEASE_VERSION="\${RELEASE_VERSION:-0.0.0.dev1}" RELEASE_SKIP_TEST=1 RELEASE_SKIP_INSTALL=1 RELEASE_SKIP_UPLOAD=1 ./scripts/release.sh' + 'uv pip install build && RELEASE_VERSION="\${RELEASE_VERSION:-0.0.0.dev1}" RELEASE_SKIP_INSTALL=1 RELEASE_SKIP_UPLOAD=1 ./scripts/release.sh' } build.dependsOn install diff --git a/metadata-ingestion-modules/airflow-plugin/scripts/release.sh b/metadata-ingestion-modules/airflow-plugin/scripts/release.sh index e9c2896c3aba2a..8f23f72082c2ca 100755 --- a/metadata-ingestion-modules/airflow-plugin/scripts/release.sh +++ b/metadata-ingestion-modules/airflow-plugin/scripts/release.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euxo pipefail -if [[ ! ${RELEASE_SKIP_TEST:-} ]]; then +if [[ ! ${RELEASE_SKIP_TEST:-} ]] && [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then ../../gradlew build # also runs tests elif [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then ../../gradlew install diff --git a/metadata-ingestion-modules/dagster-plugin/build.gradle b/metadata-ingestion-modules/dagster-plugin/build.gradle index f6822a0f2fcb67..6cb7b9295549a7 100644 --- a/metadata-ingestion-modules/dagster-plugin/build.gradle +++ b/metadata-ingestion-modules/dagster-plugin/build.gradle @@ -111,7 +111,7 @@ task testFull(type: Exec, dependsOn: [testQuick, installDevTest]) { } task buildWheel(type: Exec, dependsOn: [environmentSetup]) { commandLine 'bash', '-c', "source ${venv_name}/bin/activate && " + - 'uv pip install build && RELEASE_VERSION="\${RELEASE_VERSION:-0.0.0.dev1}" RELEASE_SKIP_TEST=1 RELEASE_SKIP_UPLOAD=1 ./scripts/release.sh' + 'uv pip install build && RELEASE_VERSION="\${RELEASE_VERSION:-0.0.0.dev1}" RELEASE_SKIP_INSTALL=1 RELEASE_SKIP_UPLOAD=1 ./scripts/release.sh' } task cleanPythonCache(type: Exec) { diff --git a/metadata-ingestion-modules/dagster-plugin/scripts/release.sh b/metadata-ingestion-modules/dagster-plugin/scripts/release.sh index 3f55f5cefe0da9..10cb816d9ffc04 100755 --- a/metadata-ingestion-modules/dagster-plugin/scripts/release.sh +++ b/metadata-ingestion-modules/dagster-plugin/scripts/release.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euxo pipefail -if [[ ! ${RELEASE_SKIP_TEST:-} ]]; then +if [[ ! ${RELEASE_SKIP_TEST:-} ]] && [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then ../../gradlew build # also runs tests elif [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then ../../gradlew install diff --git a/metadata-ingestion/build.gradle b/metadata-ingestion/build.gradle index 81031575e9bbc6..52fefc3c78945a 100644 --- a/metadata-ingestion/build.gradle +++ b/metadata-ingestion/build.gradle @@ -214,7 +214,7 @@ task cleanPythonCache(type: Exec) { task buildWheel(type: Exec, dependsOn: [install, codegen, cleanPythonCache]) { commandLine 'bash', '-c', "source ${venv_name}/bin/activate && " + - 'uv pip install build && RELEASE_VERSION="\${RELEASE_VERSION:-0.0.0.dev1}" RELEASE_SKIP_TEST=1 RELEASE_SKIP_INSTALL=1 RELEASE_SKIP_UPLOAD=1 ./scripts/release.sh' + 'uv pip install build && RELEASE_VERSION="\${RELEASE_VERSION:-0.0.0.dev1}" RELEASE_SKIP_INSTALL=1 RELEASE_SKIP_UPLOAD=1 ./scripts/release.sh' } build.dependsOn install diff --git a/metadata-ingestion/scripts/release.sh b/metadata-ingestion/scripts/release.sh index 8786eb21bff5cb..a18dd6f934b431 100755 --- a/metadata-ingestion/scripts/release.sh +++ b/metadata-ingestion/scripts/release.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euxo pipefail -if [[ ! ${RELEASE_SKIP_TEST:-} ]]; then +if [[ ! ${RELEASE_SKIP_TEST:-} ]] && [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then ../gradlew build # also runs tests elif [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then ../gradlew install