erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

Developer Account agnostic build scripts #518

Closed marciniwanicki closed 3 months ago

marciniwanicki commented 2 years ago

Hi, first of all I'd like to thank you for the great work on OCMock and the project infrastructure. The Makefile makes it really easy to build the library. My team does not use many third party libraries and those we use, we build using our internal CI. I was hoping to rely on the vanilla OCMock repo (no custom changes which would make it harder to track upstream) on our CI, but run into a small problem since @erikdoe 's Developer Account is checked in xcodeproj and .xcconfig file.

I was thinking, would it be OK to move the account details TEAM_IDENTIFIER and CODE_SIGN_IDENTITY to .travis.yml (define as env variables) and use them in the Makefile?

e.g. by appending to the xcodebuild archive commands.

$(XCODEDIST) archive -scheme OCMockLib -destination 'generic/platform=iOS' -archivePath $(ARCHIVE_DIR)/OCMock-iOS-lib TEAM_IDENTIFIER="${TEAM_IDENTIFIER}" CODE_SIGN_IDENTITY="${CODE_SIGN_IDENTITY}"

In that case an external team could re-use the Makefile and sign with their own credentials. An additional improvement would be an option to skip sining in case we want to build unsigned .xcframework.

erikdoe commented 1 year ago

I will make this change (environment variables) when I switch to GitHub Actions.