home-assistant / Iconic

:art: Auto-generated icon font library for iOS, watchOS and tvOS
Apache License 2.0
1.58k stars 87 forks source link

INPUT_PATH & CUSTOM_NAME passed via environment variable #92

Closed cskaynar closed 2 years ago

cskaynar commented 3 years ago

Description: This avoids changing checksum values Podfile.lock on different computer. Why we need this? When our teammates run pod install on different computer & CI/CD, get different sha checksum for Iconic pod. It turns out cocoapods uses local podspec.json files to generate this hash values. (For more details)

Current Iconic.podspec files passes FONT_PATH & CUSTOM_FONT_NAME variables via args in prepare_command. Since FONT_PATH value is not relative path, it varies on on each computer. So I removed FONT_PATH & CUSTOM_FONT_NAME values in podspec then access their values via Environment Variables.

dzenbot commented 3 years ago

Interesting approach. This was one of the few reasons why this framework could never get adopted at Slack when introduced. I don't longer use this framework on other projects but maybe @robbiet480 could test this out? The README would have to be updated, as well as throwing a build error from the bash script if the values are not present on the env variables.

cskaynar commented 3 years ago

@dzenbot thanks. Since FONT_PATH & CUSTOM_FONT_NAME values are set by environment variable previously as in readme. I don't think we need to update readme. (I didn't change anything to adopt this implementation in our project) For bash script null values also handle before in Inconizer.sh. Maybe I can be refactor the code. But I don't want to make huge diff in the code for ease of code review.