From e77883e638bf5d767fe739caf5dc93bfae5de41c Mon Sep 17 00:00:00 2001 From: Marius Felkner Date: Fri, 14 Jun 2024 23:02:25 +0200 Subject: [PATCH] fix: ci check for build phases --- .github/workflows/checks.yml | 4 ---- Tuist/ProjectDescriptionHelpers/ScriptPhases.swift | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 4bd1437..5bf232d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -6,9 +6,6 @@ on: pull_request: branches: [ "main", "develop" ] -env: - CI: true - jobs: build: runs-on: macos-latest @@ -113,6 +110,5 @@ jobs: base64-encoded-secret: ${{ secrets.SHARED_XCCONFIG }} filename: "Shared.xcconfig" working-directory: ".configurations/.xcconfig" - - run: export CI="true" - run: make prepare - run: make ci-lint-periphery diff --git a/Tuist/ProjectDescriptionHelpers/ScriptPhases.swift b/Tuist/ProjectDescriptionHelpers/ScriptPhases.swift index 983c3ff..12fbefe 100644 --- a/Tuist/ProjectDescriptionHelpers/ScriptPhases.swift +++ b/Tuist/ProjectDescriptionHelpers/ScriptPhases.swift @@ -7,8 +7,7 @@ extension Project { static func makeSwiftLintScriptPhase() -> TargetScript { .post( script: """ - printenv - if [[ -z ${CI} ]] ; then + if [[ ${USER} == "runner" ]] ; then make local-lint-swiftlint else echo "Skipping SwiftLint build phase on pipeline. Local build phase only." @@ -24,7 +23,7 @@ extension Project { static func makeSwiftFormatScriptPhase() -> TargetScript { .post( script: """ - if [[ -z ${CI} ]] ; then + if [[ ${USER} == "runner" ]] ; then make local-lint-swiftformat else echo "Skipping SwiftFormat build phase on pipeline. Local build phase only."