Skip to content

Commit 7519147

Browse files
add WIP issues and user story around multi-platform release
1 parent 1735a01 commit 7519147

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "CI/CD: Build fails on Windows runner due to non-portable `mkdir -p` command"
3+
labels: bug, ci/cd, chore
4+
---
5+
6+
### What is happening?
7+
8+
The `npm run build` command fails on the Windows runner in our release workflow. The log shows the error: `A subdirectory or file -p already exists.`
9+
10+
This indicates that the `bash` environment on the Windows runner is not correctly interpreting the `mkdir -p lib` command. Instead of treating `-p` as a flag, it's attempting to create a directory named `-p`.
11+
12+
### Why is this a problem?
13+
14+
This is a critical bug that completely blocks our automated release process. We cannot produce Windows binaries until this is fixed. It violates our **Comprehensive Automation** principle, as our pipeline is not reliable across all target platforms.
15+
16+
### What is the solution?
17+
18+
We must replace the non-portable `mkdir -p` command with a guaranteed cross-platform equivalent from the Node.js ecosystem.
19+
20+
1. Add the `mkdirp` package as a `devDependency` to `package.json`.
21+
2. Update the `build` script in `package.json` to use the `mkdirp lib` command instead of `mkdir -p lib`.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: "macOS Release: Binary is blocked by Gatekeeper as from an 'unverified developer'"
3+
labels: enhancement, build, documentation
4+
---
5+
6+
### What is happening?
7+
8+
When a user on macOS downloads and tries to run the `template-engine-v...-macos` executable from a GitHub release, they receive a security warning:
9+
10+
> "Apple could not verify 'template-engine-...' is free of malware..."
11+
12+
This is the expected behavior of **macOS Gatekeeper**. Because the application is not signed with a paid Apple Developer ID certificate and has not been notarized by Apple, the operating system treats it as untrusted by default.
13+
14+
### Why is this a problem?
15+
16+
This creates a significant barrier to adoption for macOS users. It makes the tool seem untrustworthy and requires users to know the specific security workarounds to even run the application.
17+
18+
### What is the solution?
19+
20+
There is a two-part solution: a necessary short-term fix and a correct long-term enhancement.
21+
22+
#### Short-Term Solution (Immediate Priority)
23+
24+
We must provide clear instructions to the user. This involves updating the `README.md` to add a section explaining the warning and the standard, safe procedure to run the application.
25+
26+
**Proposed `README.md` addition:**
27+
28+
```markdown
29+
### Note for macOS Users
30+
31+
When you first run the `template-engine-macos` executable, you may see a security warning from macOS stating that the developer cannot be verified. This is expected behavior for applications that are not notarized through the Apple App Store.
32+
33+
To run the application, you must grant it a one-time security exception:
34+
1. Right-click (or Ctrl-click) the `template-engine-macos` file and select "Open".
35+
2. You will see the same warning, but this time it will include an "Open" button. Click "Open".
36+
37+
You will only need to do this once. After you grant this exception, you can run the executable normally by double-clicking it or calling it from your terminal.
38+
```
39+
40+
#### Long-Term Solution (Future User Story)
41+
42+
To remove the warning entirely, the application must be officially signed and notarized by Apple. This is a complex process that involves:
43+
44+
1. Enrolling in the paid Apple Developer Program.
45+
2. Generating a "Developer ID Application" certificate.
46+
3. Updating the `release.yml` workflow to use this certificate (stored as a secret) to sign the macOS binary.
47+
4. Adding a step to submit the signed binary to Apple's notarization service and "staple" the resulting ticket to the executable.
48+
49+
This should be tracked as a separate, future enhancement.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Story 20: Implement Cross-Platform Reliable Build Scripts
2+
3+
- **Project**: `template-engine-ts`
4+
- **Status**: `todo`
5+
- **As an** Engineering Team,
6+
- **I want to** use build scripts that are fully cross-platform compatible,
7+
- **so that** our CI/CD pipeline runs reliably on all operating systems (Linux, macOS, Windows) without platform-specific errors.
8+
9+
## Acceptance Criteria
10+
11+
- The `npm run build` command must execute successfully on a clean checkout on Windows, macOS, and Linux runners.
12+
- Native shell commands with known platform inconsistencies (like `mkdir -p`) must be replaced with cross-platform equivalents from the Node.js ecosystem (e.g., `mkdirp`).
13+
- The CI pipeline must not produce any shell-specific errors related to file or directory creation.
14+
15+
## Metrics for Success
16+
17+
- **Primary Metric**: "Change Failure Rate for the CI pipeline is reduced to 0% for build-script-related issues."
18+
- **Secondary Metrics**: "Developer time spent debugging platform-specific CI failures is reduced."

0 commit comments

Comments
 (0)