Skip to content

Feature/add windows support#220

Merged
chrisghill merged 4 commits intomainfrom
feature/add-windows-support
Mar 17, 2026
Merged

Feature/add windows support#220
chrisghill merged 4 commits intomainfrom
feature/add-windows-support

Conversation

@chrisghill
Copy link
Member

No description provided.

This comment was marked as outdated.

dnpbfs and others added 3 commits March 16, 2026 14:17
- 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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 with filepath.Join and filepath.Rel in template rendering/copy logic.
  • Normalize bundle layer paths with filepath.ToSlash to 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; \
@chrisghill chrisghill merged commit 5350e79 into main Mar 17, 2026
6 checks passed
@chrisghill chrisghill deleted the feature/add-windows-support branch March 17, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants