Skip to content

Commit 7cf8658

Browse files
fix(ci): revert UUID extraction to security cms -D with file guard
Replaces the grep workaround with the structured security cms -D approach. The original failure (Cannot parse a NULL or zero-length data) was caused by an empty provisioning profile file, not a security cms limitation. A -s file size guard now surfaces that failure immediately with a clear error message. Also reverts dev:storybook script rename to preserve the verb:scope convention used throughout the repo, and updates docs accordingly.
1 parent e500ae9 commit 7cf8658

7 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/build-release-ios.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ jobs:
6060
- name: Extract UUID from provisioning profile
6161
run: |
6262
PROFILE="$HOME/Library/MobileDevice/Provisioning Profiles/build_pp.mobileprovision"
63-
UUID=$(grep -aEo '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}' "$PROFILE" | head -1)
63+
if [ ! -s "$PROFILE" ]; then echo "::error::Provisioning profile is missing or empty at $PROFILE"; exit 1; fi
64+
UUID=$(security cms -D -i "$PROFILE" | /usr/libexec/PlistBuddy -c "Print :UUID" /dev/stdin)
6465
if [ -z "$UUID" ]; then echo "::error::Failed to extract UUID from provisioning profile"; exit 1; fi
6566
echo "UUID=$UUID" >> $GITHUB_ENV
6667
echo "Extracted UUID: $UUID"

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pnpm build:components
2727
pnpm dev:components
2828

2929
# Run storybook app for iOS (requires prior build)
30-
pnpm storybook
30+
pnpm dev:storybook
3131

3232
# Run storybook for specific platform
3333
cd apps/storybook

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pnpm build
149149
| --------------------- | --------------------------------------- |
150150
| `pnpm install` | Install all dependencies |
151151
| `pnpm build` | Build all packages |
152-
| `pnpm storybook` | Run the storybook app |
152+
| `pnpm dev:storybook` | Run the storybook app |
153153
| `pnpm dev:components` | Watch mode for component library |
154154
| `pnpm lint` | Run ESLint |
155155
| `pnpm format` | Format code with Prettier |
@@ -176,7 +176,7 @@ design-system-mobile/
176176
pnpm build
177177

178178
# Start the storybook app
179-
pnpm storybook
179+
pnpm dev:storybook
180180

181181
# For iOS, install pods (first time only)
182182
cd apps/storybook/ios && pod install

apps/storybook/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ From the monorepo root:
1515
pnpm build
1616

1717
# Run the storybook app
18-
pnpm storybook
18+
pnpm dev:storybook
1919

2020
# Or from this directory
2121
pnpm ios # Run on iOS simulator

apps/storybook/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This is an [Expo](https://expo.dev) project using [file-based routing](https://d
2828
3. Run the storybook app:
2929

3030
```bash
31-
pnpm storybook
31+
pnpm dev:storybook
3232
```
3333

3434
4. Press `i` to open in iOS Simulator or `a` for Android Emulator.
@@ -47,7 +47,7 @@ Use Expo's development build to run on a physical device:
4747
4848
```bash
4949
# iOS
50-
pnpm storybook -- --device
50+
pnpm dev:storybook -- --device
5151
5252
# Or scan the QR code with the Expo Go app (limited functionality)
5353
```
@@ -99,7 +99,7 @@ pod install
9999
Clear the cache and restart:
100100
101101
```bash
102-
pnpm storybook -- --clear
102+
pnpm dev:storybook -- --clear
103103
```
104104
105105
## Learn more

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build:components": "turbo run build --filter @equinor/eds-mobile-components",
1010
"build:storybook": "turbo run build --filter @equinor/mobile-storybook",
1111
"dev": "turbo run dev",
12-
"storybook": "turbo run dev --filter @equinor/mobile-storybook",
12+
"dev:storybook": "turbo run dev --filter @equinor/mobile-storybook",
1313
"dev:components": "turbo run dev --filter @equinor/eds-mobile-components",
1414
"lint": "turbo run lint",
1515
"lint:components": "turbo run lint --filter @equinor/eds-mobile-components",

packages/components/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default function App() {
165165

166166
1. Make changes in `src/`
167167
2. Run `pnpm dev` for watch mode (auto-rebuilds)
168-
3. Test changes in storybook app: `cd ../../ && pnpm storybook`
168+
3. Test changes in storybook app: `cd ../../ && pnpm dev:storybook`
169169
4. **Always use tokens** (`theme.colors`, `theme.spacing`, `theme.typography`) for new work
170170
5. All components must support both light/dark mode and comfortable/spacious density
171171

0 commit comments

Comments
 (0)