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

Not working for Alfred 5 #82

Open
IamTheFij opened this issue Mar 15, 2023 · 1 comment · May be fixed by #84
Open

Not working for Alfred 5 #82

IamTheFij opened this issue Mar 15, 2023 · 1 comment · May be fixed by #84

Comments

@IamTheFij
Copy link

It looks like the library determines that Version 4 is being used because we're using the non-numbered Alfred folder. This folder is apparently used for all new versions.

Two possible fixes:

  • Use the max version found in the version keys in that file
  • Always use "current"

I'm leaning towards the latter.

@IamTheFij
Copy link
Author

For the time being, I'm working around this with:

func InfoWithVersion(v int) build.Option {
	return func(i *build.Info) {
		i.AlfredMajorVersion = v
	}
}

func init() {
	var err error
	if info, err = build.NewInfo(InfoWithVersion(5)); err != nil {
		panic(err)
	}
}

If it works well enough with 0 as the version, then the current approach should work.

Additionally, this can be worked around with no code change and setting the version in the environment before running the build. Eg. env alfred_version=5 mage build

@IamTheFij IamTheFij linked a pull request Mar 20, 2023 that will close this issue
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