Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Switching file type for Windows releases #352

Open
1 of 4 tasks
Dragon1573 opened this issue Jan 7, 2025 · 0 comments · May be fixed by #353
Open
1 of 4 tasks

[Feature Request]: Switching file type for Windows releases #352

Dragon1573 opened this issue Jan 7, 2025 · 0 comments · May be fixed by #353

Comments

@Dragon1573
Copy link

For what?

  • I have found a bug
  • I want to request a feature
  • I have a question
  • Other

Important

This is a continuing discussion of previously closed issue. Also there's an external issue which related to this.

Build environment

Note

I'm new to Golang and try building your project in an isolated Windows Sandbox instance.

Following outputs comes from the instance. There's NO Golang build environment installed on my host device.

  • Golang version: go version go1.23.4 windows/amd64
  • My GOPATH is set to: C:\Users\WDAGUtilityAccount\go

Note

The Windows Sandbox instance is launched via PowerShell script Tools/SandboxTest.ps1. GoLang.Go and Git.Git are both installed via winget.exe. The $env:GOPATH is automatically configured by Golang Installer. I haven't configured it manually.

Description

In previous discussion, there's a community contributor who wants to submit this package to microsoft/winget-pkgs repository. But the current release archive type *.tar.gz is not supported by winget.exe at the moment. Hence it breaks him/her enthusiasm.

According to your comment, this project uses Go Releaser. After investigating it, I find it's possible to switch archives format from *.tar.gz to *.zip for Windows only (I see many projects uses ZIP as archive on Windows, other archive types are rarely seen), by adding following configurations to release section of .goreleaser.yml.

# .goreleaser.yml

release:
  - # Can be used to change the archive formats for specific GOOSs.
    # Most common use case is to archive as zip on Windows.
    format_overrides:
      - # Which GOOS to override the format for.
        goos: windows

        # The format to use for the given GOOS.
        #
        # Valid options are `tar.gz`, `tgz`, `tar.xz`, `txz`, tar`, `gz`, `zip`, `binary`, and `none`.
        format: zip

Since WinGet manifest version v1.9.0, it provides enhanced support of portable executables in ZIP archives. We can set ArchiveBinariesDependOnPath: true for those portable executables in ZIP archives. I think there's no more problems submitting this package to WinGet. ❤️

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 a pull request may close this issue.

1 participant