JackMordaunt / icns

Easily create .icns files (Mac Icons) with this Go library or the included CLI.
https://liberapay.com/JackMordaunt
MIT License
77 stars 5 forks source link

latest tag fails for build ? #29

Open gedw99 opened 11 months ago

gedw99 commented 11 months ago

Hey @JackMordaunt

Not sure as I did not dig into this, but v2.2.7 tag works for one cmd but not the other...

# works...
go install github.com/jackmordaunt/icns/v2/cmd/icnsify@v2.2.7

# works...
go install github.com/jackmordaunt/icns/cmd/preview@latest

# fails...
go install github.com/jackmordaunt/icns/cmd/preview@v2.2.7
go: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: reading https://proxy.golang.org/github.com/jackmordaunt/icns/cmd/preview/@v/v2.2.7.info: 404 Not Found
        server response: not found: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: invalid version: unknown revision cmd/preview/v2.2.7
gedw99 commented 11 months ago

so just using latest for now...

gedw99 commented 11 months ago

maybe we need a go.work not the root and then a go.mod for each cmd folder ?

will make it easier for you ?

JackMordaunt commented 11 months ago

Hi Ged,

The preview tool is unversioned to allow the compilation to be decoupled. That way we can cross compile the main library (preview cannot cross compile since Gio cannot cross compile yet).

This decision was made prior to go work. Let me see if a workspace provides a more elegant solution here. Thanks for the suggestion :)

JackMordaunt commented 11 months ago

@gedw99 I've pushed a commit that makes use of workspaces. Can you see if this works as expected? Latest tag v2.3.0.

gedw99 commented 11 months ago

thanks @JackMordaunt

The aim is to be able to do a go install for each of the 2 cmd mains.

quick test using go install. neither works.


go install github.com/jackmordaunt/icns/v2/cmd/icnsify@v2.3.0
go: github.com/jackmordaunt/icns/v2/cmd/icnsify@v2.3.0: github.com/jackmordaunt/icns/v2/cmd/icnsify@v2.3.0: reading https://proxy.golang.org/github.com/jackmordaunt/icns/v2/cmd/icnsify/@v/v2.3.0.info: 404 Not Found
        server response: not found: github.com/jackmordaunt/icns/v2/cmd/icnsify@v2.3.0: invalid version: unknown revision v2/cmd/icnsify/v2.3.0

go install github.com/jackmordaunt/icns/cmd/preview@v2.3.0
go: github.com/jackmordaunt/icns/cmd/preview@v2.3.0: github.com/jackmordaunt/icns/cmd/preview@v2.3.0: reading https://proxy.golang.org/github.com/jackmordaunt/icns/cmd/preview/@v/v2.3.0.info: 404 Not Found
        server response: not found: github.com/jackmordaunt/icns/cmd/preview@v2.3.0: invalid version: unknown revision cmd/preview/v2.3.0

old version is same as before with only icnsify working.

go install github.com/jackmordaunt/icns/v2/cmd/icnsify@v2.2.7

go install github.com/jackmordaunt/icns/cmd/preview@v2.2.7   
go: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: reading https://proxy.golang.org/github.com/jackmordaunt/icns/cmd/preview/@v/v2.2.7.info: 404 Not Found
        server response: not found: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: invalid version: unknown revision cmd/preview/v2.2.7

latest does work for the gio app

# works !!
go install github.com/jackmordaunt/icns/cmd/preview@latest

For the Preview command, I guess we need the tagged release to be a zipped ( or tar ) of the packaged binary for the 6 permutations of the 3 OS and the 2 go arch ( amd64 and arm64 ). Will need the CI GitHub action to compile using a matrix and then to do a release on a pushed tag. Then devs can use a curl or whatever to get the zip, unzip it and run the gio app. Thats what I think anyways... For example for Mac it's a .app. For windows an exe, and for linux I honestly don know. Right now I only need Mac and windows for amd64 and arm64. No linux needed by me right now...

If our curious, I am using a refile to do all this on another project. The makefile is called locally and in CI. One source of truth. https://github.com/gedw99/2fa/blob/main/Makefile https://github.com/gedw99/2fa/tree/main/.github/workflows

JackMordaunt commented 11 months ago

I've made some more structural changes.

I can successfully go install both commands now:

@gedw99 Can you please verify this on your end, thanks :)

gedw99 commented 11 months ago

hey @JackMordaunt

Thanks for this...

latest works 👍


go install github.com/jackmordaunt/icns/v2/cmd/icnsify@latest

go install github.com/jackmordaunt/icns/cmd/preview@latest

v3.0.0 does not....


go install github.com/jackmordaunt/icns/v2/cmd/icnsify@v3.0.0
go: github.com/jackmordaunt/icns/v2/cmd/icnsify@v3.0.0: github.com/jackmordaunt/icns/v2/cmd/icnsify@v3.0.0: reading https://proxy.golang.org/github.com/jackmordaunt/icns/v2/cmd/icnsify/@v/v3.0.0.info: 404 Not Found
        server response: not found: github.com/jackmordaunt/icns/v2/cmd/icnsify@v3.0.0: invalid version: unknown revision v2/cmd/icnsify/v3.0.0

go install github.com/jackmordaunt/icns/cmd/preview@v3.0.0
go: github.com/jackmordaunt/icns/cmd/preview@v3.0.0: github.com/jackmordaunt/icns/cmd/preview@v3.0.0: reading https://proxy.golang.org/github.com/jackmordaunt/icns/cmd/preview/@v/v3.0.0.info: 404 Not Found
        server response: not found: github.com/jackmordaunt/icns/cmd/preview@v3.0.0: invalid version: unknown revision cmd/preview/v3.0.0

v2.2.7 only for icnsify


go install github.com/jackmordaunt/icns/v2/cmd/icnsify@v2.2.7

go install github.com/jackmordaunt/icns/cmd/preview@v2.2.7
go: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: reading https://proxy.golang.org/github.com/jackmordaunt/icns/cmd/preview/@v/v2.2.7.info: 404 Not Found
        server response: not found: github.com/jackmordaunt/icns/cmd/preview@v2.2.7: invalid version: unknown revision cmd/preview/v2.2.7

Would be nice is there is a tagged release version so that me and others can have a stable version we can use. I use it as part of CI...