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

make snapshot fails with error=failed to find files to archive: #2

Open
totallyGreg opened this issue Dec 7, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@totallyGreg
Copy link

make snapshot
  • archives
    • creating                                       archive=build/MacOSVK_1.0.0-SNAPSHOT-d03a48a_darwin_arm64.zip
  ⨯ release failed after 8s                  error=failed to find files to archive: globbing failed for pattern build/MacOSVK_darwin_arm64/MacOSVK.app: matching "./build/MacOSVK_darwin_arm64/MacOSVK.app": file does not exist
make: *** [snapshot] Error 1

the .goreleaser.yml generated file build/config.yaml defines an archive with source file that does not match the actual target name MacOSVK_darwin_arm64_v8.0

builds:
  - id: MacOSVK
    targets:
      - darwin_arm64_v8.0

archives:
  - id: default
    name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
    format: zip
    files:
      - src: LICENSE
      - src: build/MacOSVK_darwin_arm64/MacOSVK.app
        dst: MacOSVK.app

modifying .goreleaser.yml fixes this.

- src: build/MacOSVK_darwin_arm64_v8.0/MacOSVK.app

@totallyGreg totallyGreg added the bug Something isn't working label Dec 7, 2024
@Raikerian
Copy link
Member

Hi. I am not able to reproduce this issue. What version of goreleaser are you running? And what kind of environment?

INFO [2024-12-09 14:10:40.25]: ▸   • archives
INFO [2024-12-09 14:10:40.25]: ▸     • creating                                       archive=build/MacOSVK_1.0.11-SNAPSHOT-8fdf296_darwin_arm64.zip
INFO [2024-12-09 14:10:43.73]: ▸   • calculating checksums
INFO [2024-12-09 14:10:43.76]: ▸   • writing artifacts metadata
INFO [2024-12-09 14:10:43.76]: ▸   • release succeeded after 1m7s
INFO [2024-12-09 14:10:43.76]: ▸   • thanks for using goreleaser!

Keep in mind also that you dont have to use that complicated signing and .app skeleton builder from the goreleaser included in the repo, unless you want to properly sign your binary with vmnet and VM Networking capabilities. Normal go build and one-liner codesign is enough for most cases https://github.com/agoda-com/macOS-vz-kubelet?tab=readme-ov-file#usage-guide

@totallyGreg
Copy link
Author

weird. I was trying to keep it as simple as possible, running make snapshot after adding my certificate name and profile path.

I am looking to test with the network entitlements.

goreleaser --version
  ____       ____      _
 / ___| ___ |  _ \ ___| | ___  __ _ ___  ___ _ __
| |  _ / _ \| |_) / _ \ |/ _ \/ _` / __|/ _ \ '__|
| |_| | (_) |  _ <  __/ |  __/ (_| \__ \  __/ |
 \____|\___/|_| \_\___|_|\___|\__,_|___/\___|_|
goreleaser: Deliver Go Binaries as fast and easily as possible
https://goreleaser.com

GitVersion:    2.4.7
GitCommit:     700889269f740f659c9f3867f2b79fed677b74b0
GitTreeState:  clean
BuildDate:     2024-11-18T10:53:42
BuiltBy:       homebrew
GoVersion:     go1.23.3
Compiler:      gc
ModuleSum:     unknown
Platform:      darwin/arm64

@Raikerian
Copy link
Member

Raikerian commented Dec 10, 2024

It's probably goreleaser newer version. The project is currently supporting 2.2.0 as indicated in mise configuration file here https://github.com/agoda-com/macOS-vz-kubelet/blob/main/.mise.toml#L3

Let me check the newer version and see what has changed. Thank you for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants