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

latest tag fails for build ? #29

Open
gedw99 opened this issue Dec 3, 2023 · 7 comments
Open

latest tag fails for build ? #29

gedw99 opened this issue Dec 3, 2023 · 7 comments

Comments

@gedw99
Copy link

gedw99 commented Dec 3, 2023

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
Copy link
Author

gedw99 commented Dec 3, 2023

so just using latest for now...

@gedw99
Copy link
Author

gedw99 commented Dec 3, 2023

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
Copy link
Owner

JackMordaunt commented Dec 6, 2023

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
Copy link
Owner

@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
Copy link
Author

gedw99 commented Dec 6, 2023

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
Copy link
Owner

I've made some more structural changes.

  • bump entire repo to v3, set default branch to v3
  • add a go.mod to cmd/icnsify
  • rename all imports to use v3
  • tagged it v3.0.0

I can successfully go install both commands now:

  • go install github.com/jackmordaunt/cmd/icnsify@latest
  • go install github.com/jackmordaunt/cmd/preview@latest

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

@gedw99
Copy link
Author

gedw99 commented Dec 8, 2023

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...

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

No branches or pull requests

2 participants