From 4ea11c4b096d36d2370d1f458aceae8d27dafc4d Mon Sep 17 00:00:00 2001 From: GoncaloGarcia Date: Tue, 29 Apr 2025 10:18:00 +0100 Subject: [PATCH] Run build only on merge request --- .gitlab-ci.yml | 2 +- .teamcity/mac/build.sh | 5 ++++- Makefile | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ff97ed0..c82112b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ check_tag: build_cloudflared_macos: &build stage: build rules: - - if: '$CI_COMMIT_BRANCH != "master"' + - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: always - when: never dependencies: diff --git a/.teamcity/mac/build.sh b/.teamcity/mac/build.sh index 02f8ed78..d05f7c17 100755 --- a/.teamcity/mac/build.sh +++ b/.teamcity/mac/build.sh @@ -167,9 +167,12 @@ rm -rf "${TARGET_DIRECTORY}" export TARGET_OS="darwin" GOCACHE="$PWD/../../../../" GOPATH="$PWD/../../../../" CGO_ENABLED=1 make cloudflared + # This allows apple tools to use the certificates in the keychain without requiring password input. # This command always needs to run after the certificates have been loaded into the keychain -security set-key-partition-list -S apple-tool:,apple: -s -k "${CFD_CODE_SIGN_PASS}" cloudflared_build_keychain +if [[ ! -z "$CFD_CODE_SIGN_PASS" ]]; then + security set-key-partition-list -S apple-tool:,apple: -s -k "${CFD_CODE_SIGN_PASS}" cloudflared_build_keychain +fi # sign the cloudflared binary if [[ ! -z "$CODE_SIGN_NAME" ]]; then diff --git a/Makefile b/Makefile index 5316f8b6..4cfdaafc 100644 --- a/Makefile +++ b/Makefile @@ -239,7 +239,7 @@ github-release: .PHONY: macos-release macos-release: - - python3 github_release.py --path $(PWD)/artifacts/ --release-version $(VERSION) --draft --dry-run + - python3 github_release.py --path $(PWD)/artifacts/ --release-version $(VERSION) .PHONY: r2-linux-release r2-linux-release: