-
Notifications
You must be signed in to change notification settings - Fork 486
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
feat: Generate Chocolatey packages #2594
Conversation
|
fc1bba6
to
5698c7c
Compare
Unfortunately, this requires a I'll close this for now. Maybe something will change in the future. |
Is it possible that this installation method would work? |
The above requires |
I'm not entirely sure how to interpret the error(s) on the job. It's complaining that there's no such directory as The latter makes it look like it did actually try to create the package, implying that the |
I was incorrect in #2594 (comment). The copyright field does not support templates:
(notice how it does not say I trimmed project_name: chezmoi
before:
hooks:
- go mod download all
builds:
- id: chezmoi-nocgo
env:
- CGO_ENABLED=0
goos:
- windows
goarch:
- amd64
goarm:
- ''
ldflags:
- -s
- -w
- -X main.version={{ .Version }}
- -X main.commit={{ .Commit }}
- -X main.date={{ .Date }}
- -X main.builtBy=goreleaser
chocolateys:
- authors: Tom Payne <[email protected]>
project_url: https://chezmoi.io
copyright: 'Copyright © Tom Payne, 2018-{{ .Now.Format "2006" }}'
license_url: https://github.com/twpayne/chezmoi/blob/master/LICENSE
project_source_url: https://github.com/twpayne/chezmoi
docs_url: https://chezmoi.io
bug_tracker_url: https://github.com/twpayne/chezmoi/issues
summary: Manage your dotfiles across multiple diverse machines, securely.
description: Manage your dotfiles across multiple diverse machines, securely.
release_notes: 'https://github.com/twpayne/chezmoi/releases/tag/v{{ .Version }}'
and ran goreleaser locally with: ❯ goreleaser release --clean --config=".goreleaser.yaml" --skip-announce --skip-publish --skip-validate --snapshot --auto-snapshot --timeout="1h" (I know the flags are excessive) and here are the relevant chocolatey files:
|
I've been working on this and checking the output with Chocolatey .nuspec Checker, though I did have to set it up manually because I don't feel like re-installing Chocolatey at the moment. As is, I get this output: WARNING: ** The recommended XML comment to test UTF-8 encoding was not found.
** Suggestion: Consider running CNC -UpdateXMLComment to add a UTF-8 encoding test XML comment.
WARNING: ** <authors> - contains an e-mail address. This will trigger a message from the verifier:
** Requirements: Email address should not be used in the Author and Copyright fields of the nuspec file.
WARNING: ** <copyright> - contains an e-mail address. This will trigger a message from the verifier:
** Requirements: Email address should not be used in the Author and Copyright fields of the nuspec file.
FYI: ** <dependencies> - element is empty.
** Suggestion: Consider adding a header and help propagate (unofficial) choco:// Protocol support
** Suggestion: Consider adding PACKAGE NOTES to inform users of any special information about the package.
WARNING: ** <iconUrl> - element is empty. This will trigger a message from the verifier:
** Guideline: The iconUrl should be added if there is one. Please correct this in the nuspec, if applicable.
WARNING: ** <mailingListUrl> - element is empty. This will trigger a message from the verifier:
** Suggestion: mailingListUrl - points to the forum or email list group for the software
WARNING: ** <owners> element is empty, this element is a requirement.
WARNING: ** <packageSourceUrl> - element is empty. This will trigger a message from the verifier:
** Guideline: The nuspec has been enhanced to allow packageSourceUrl, pointing to the url where the package
source resides. This is a strong guideline because it simplifies collaboration.
Please add it to the nuspec.
WARNING: ** <tags> - element is empty.
WARNING: ** <title> and <id> are the same which will trigger a message from the verifier:
** Guideline: Title (title) matches id exactly. Please consider using something slightly more descriptive
for the title in the nuspec.
WARNING: ** CHOCOLATEYINSTALL.PS1 - is encoded using ASCII or UTF-8 w/o BOM.
** PowerShell scripts need to be saved in UTF–8 with BOM.
** Suggestion: Consider running CNC -UpdateScripts to re-write CHOCOLATEYINSTALL.PS1 to UTF-8 w/ BOM.
WARNING: ** CHOCOLATEYINSTALL.PS1 - the URL:
https://github.com/twpayne/chezmoi/releases/download/v2.35.0/chezmoi_2.35.0-SNAPSHOT-4af84793_windows_amd64.tar.gz
site might be OK, status code: 404.
CNC found 4 REQUIRED changes, 3 GUIDELINE changes, 6 SUGGESTED changes, 0 NOTES, 1 FYIs, and made 0 changes. I've satisfied the required changes in my working copy, though some of the suggestions are impossible to implement without goreleaser changes as far as I can tell.
|
@twpayne I believe I have this mostly solved. Should I close this and open a new PR, or would you prefer if I instead linked my branch here and you can update it at your convenience? |
Please close this PR and open a new one. There are very few open PRs at the moment, so assume that no one has any pending changes. You own this :) |
WIP, not ready for review.