Merged
Conversation
- Make signal handling Windows-safe in cmd/server.go (SIGTERM only on Unix) - Add windows-build and windows-archives to .goreleaser.yaml (amd64, arm64) - Add build.windows Makefile target and detect Windows/MINGW in build Made-with: Cursor
Use filepath.ToSlash so OCI layer paths use / on all platforms. Fixes deployment error 'cd: bundle/src: No such file or directory' when bundles are published from Windows and extracted on Linux. Made-with: Cursor
e7dc9c3 to
08542d2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to improve Windows compatibility across the CLI by adjusting filesystem path handling, signal handling, and release/build tooling to produce Windows artifacts.
Changes:
- Replace
path.Join/string-based path manipulation withfilepath.Joinandfilepath.Relin template rendering/copy logic. - Normalize bundle layer paths with
filepath.ToSlashto keep ignore matching and OCI annotations consistent across OSes. - Add Windows build targets to the Makefile and Windows build/archive entries to GoReleaser; adjust server signal subscription for Windows.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/templates/templates.go | Uses filepath.Join for template directory resolution (Windows-safe paths). |
| pkg/templates/file_manager.go | Uses filepath.Join and filepath.Rel; updates root-directory detection logic accordingly. |
| pkg/bundle/publish.go | Normalizes relative paths with filepath.ToSlash before ignore matching and annotation. |
| cmd/server.go | Avoids subscribing to SIGTERM on Windows by building the signal list conditionally. |
| Makefile | Adds a build.windows target and Windows detection in build. |
| .goreleaser.yaml | Adds Windows builds and archives to release configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
108
to
+113
| func relativeWritePath(currentFilePath, readDirectory string) string { | ||
| path := strings.Replace(currentFilePath, readDirectory, "", 1) | ||
| if path == "" { | ||
| path = "." | ||
| rel, err := filepath.Rel(readDirectory, currentFilePath) | ||
| if err != nil { | ||
| return "." | ||
| } | ||
|
|
||
| return path | ||
| return rel |
Comment on lines
+57
to
61
| elif echo "$$(uname -s)" | grep -q -E "^(MINGW|MSYS|Windows)"; then \ | ||
| $(MAKE) build.windows; \ | ||
| else \ | ||
| echo "Error: Unsupported operating system. Please use 'make build.macos' or 'make build.linux' directly."; \ | ||
| echo "Error: Unsupported operating system. Please use 'make build.macos', 'make build.linux', or 'make build.windows' directly."; \ | ||
| exit 1; \ |
ChristensenJoe
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.