Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Lowercasing "ios" directory in release-react#222

Merged
lostintangent merged 1 commit intomasterfrom
release-react
May 5, 2016
Merged

Lowercasing "ios" directory in release-react#222
lostintangent merged 1 commit intomasterfrom
release-react

Conversation

@lostintangent
Copy link
Copy Markdown
Member

This PR fixes react-native-code-push#329 by simply lowercasing the "ios" directory we use when trying to auto-detect the app's binary version. The React Native templates have always generated a lowercased "ios" directory, and therefore, we should have already been using this. On Windows and most OS X machines, it wouldn't matter either way, but as noted by the bug, on Linux machines, case matters, and therefore, this PR enables us to work across all platforms by default.

If someone were to change the "ios" directory to be named "iOS" or "IoS" (or whatever), and run release-react on a machine with a case-sensitive file-system (e.g. Linux), this PR wouldn't address that scenario. However, I don't believe this is a common scenario at all, so I decided not to worry about it prematurely.

try {
var infoPlistContainingFolder: string = path.join("iOS", projectName);
var infoPlistContainingFolder: string = path.join("ios", projectName);
var infoPlistContents: string = fs.readFileSync(path.join(infoPlistContainingFolder, "Info.plist")).toString();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about making Info.plist case insensitve?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This casing is always used. If anything, we have a feature request to enable specifying a different name and/or location, but if the app is using Info.plist, it's always cased this way.

@shishirx34
Copy link
Copy Markdown
Contributor

LGTM!

PS: I had the fix as well and waiting on Ruben to verify with travis. Since you already sent this one out, @rub8n we can try this fix out instead.

@lostintangent
Copy link
Copy Markdown
Member Author

Ah sorry, I thought you were working on the WKWebView issue. I also verified that this works on Travis, which isn't unique, other than using Linux by default.

@lostintangent lostintangent merged commit 4a899e2 into master May 5, 2016
@buptkang buptkang deleted the release-react branch September 7, 2017 18:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Travis support? code-push release-react

3 participants