Skip to content

Commit

Permalink
fix: ios app name resolution on linux (#118)
Browse files Browse the repository at this point in the history
* fix: ios app name resolution on linux

* use xcodeproj instead of xcworkspace

* set git config in tests
  • Loading branch information
km1chno authored Sep 20, 2024
1 parent e8505d4 commit 1770bb4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
jest:
name: Jest
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions __tests__/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export const setupTestProject = (projectName: string): void => {
)} ${PATH_TO_TEST_PROJECT}`,
`cd ${PATH_TO_TEST_PROJECT}`,
'git init',
'git config --local user.email "email"',
'git config --local user.name "name"',
'git add .',
'git commit -m "Initial commit"',
].join(' && ')
Expand Down
6 changes: 3 additions & 3 deletions src/recipes/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ export const createBuildWorkflows = async (

const iOSAppName = toolbox.filesystem
.list('ios')
?.find((file) => file.endsWith('.xcworkspace'))
?.replace('.xcworkspace', '')
?.find((file) => file.endsWith('.xcodeproj'))
?.replace('.xcodeproj', '')

if (!iOSAppName) {
throw CycliError(
'Failed to obtain iOS app name. Perhaps your ios/ directory is missing .xcworkspace file.'
'Failed to obtain iOS app name. Perhaps your ios/ directory is missing *.xcodeproj file.'
)
}

Expand Down

0 comments on commit 1770bb4

Please sign in to comment.