From 325f53496f22ca8e972c29a6cd36aabd9feaa1bb Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Sat, 7 Dec 2024 13:58:22 -0500 Subject: [PATCH] remove internal release workaround for dbt-adapters since it is not currently published internally --- .github/workflows/_package-directory.yml | 7 ------- .github/workflows/_publish-internal.yml | 2 +- pyproject.toml | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/_package-directory.yml b/.github/workflows/_package-directory.yml index bbfc9123..d10e9758 100644 --- a/.github/workflows/_package-directory.yml +++ b/.github/workflows/_package-directory.yml @@ -11,9 +11,6 @@ on: directory: description: "The root directory of the package" value: ${{ jobs.package.outputs.directory }} - version-file: - description: "The path to the version file of the package" - value: ${{ jobs.package.outputs.version-file }} defaults: run: @@ -24,17 +21,13 @@ jobs: runs-on: ${{ vars.DEFAULT_RUNNER }} outputs: directory: ${{ steps.package.outputs.directory }} - version-file: ${{ steps.package.outputs.version-file }} steps: - id: package run: | if [[ ${{ inputs.package }} == "dbt-adapters" ]] then directory="" - version_file="./dbt/adapters/__about__.py" else directory="${{ inputs.package }}/" - version_file="./src/dbt/adapters/$(cut -c 5- ${{ inputs.package }})/__version__.py" fi echo "directory=$directory" >> $GITHUB_OUTPUT - echo "version-file=version_file" >> $GITHUB_OUTPUT diff --git a/.github/workflows/_publish-internal.yml b/.github/workflows/_publish-internal.yml index a24971ff..42fb6290 100644 --- a/.github/workflows/_publish-internal.yml +++ b/.github/workflows/_publish-internal.yml @@ -81,7 +81,7 @@ jobs: versions_published: ${{ steps.published.outputs.versions }} - run: | VERSION=${{ steps.next.outputs.internal_release_version }}+$(git rev-parse HEAD) - tee <<< "version = \"$VERSION\"" ${{ needs.package.outputs.version-file }} + tee <<< "version = \"$VERSION\"" ./src/dbt/adapters/$(cut -c 5- ${{ inputs.package }})/__version__.py working-directory: ./${{ needs.package.outputs.directory }} - run: sed -i "/dbt-core[<>~=]/d" ./pyproject.toml working-directory: ./${{ needs.package.outputs.directory }} diff --git a/pyproject.toml b/pyproject.toml index d84f35f8..0c03b341 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,6 @@ code-quality = "pre-commit run --all-files" unit-tests = "python -m pytest {args:tests/unit}" workflow-code-quality = "gh workflow run _code-quality.yml --ref $(git rev-parse --abbrev-ref HEAD) -f branch=$(git rev-parse --abbrev-ref HEAD)" workflow-generate-changelog = "gh workflow run _generate-changelog.yml --ref $(git rev-parse --abbrev-ref HEAD) -f package=dbt-adapters -f merge=false -f branch=$(git rev-parse --abbrev-ref HEAD)" -workflow-publish-internal = "gh workflow run _publish-internal.yml --ref $(git rev-parse --abbrev-ref HEAD) -f package=dbt-adapters -f deploy-to=test -f branch=$(git rev-parse --abbrev-ref HEAD)" workflow-publish-pypi = "gh workflow run _publish-pypi.yml --ref $(git rev-parse --abbrev-ref HEAD) -f package=dbt-adapters -f deploy-to=test -f branch=$(git rev-parse --abbrev-ref HEAD)" workflow-unit-tests = "gh workflow run _unit-tests.yml --ref $(git rev-parse --abbrev-ref HEAD) -f package=dbt-adapters -f branch=$(git rev-parse --abbrev-ref HEAD)" workflow-verify-build = "gh workflow run _verify-build.yml --ref $(git rev-parse --abbrev-ref HEAD) -f package=dbt-adapters -f branch=$(git rev-parse --abbrev-ref HEAD)"