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

[Bug]: After Hooks Env (Pro) does not work as advertised #2762

Closed
2 of 3 tasks
aeneasr opened this issue Dec 14, 2021 · 3 comments
Closed
2 of 3 tasks

[Bug]: After Hooks Env (Pro) does not work as advertised #2762

aeneasr opened this issue Dec 14, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@aeneasr
Copy link
Contributor

aeneasr commented Dec 14, 2021

What happened?

Following https://goreleaser.com/customization/hooks/ I wrote a hook like this:


after:
  hooks:
  - cmd: "bash <(curl -s https://raw.githubusercontent.com/ory/xgoreleaser/master/docs.sh)"
    env:
      TAG_VERSION: "{{ .Tag }}"
      DOCS_VERSION: "{{ .Major }}.{{ .Minor }}"

Running goreleaser check though results in:

% goreleaser check    
   • running goreleaser v1.1.0-pro
   • loading config file       file=.goreleaser.yml
   ⨯ command failed            error=failed to load config: yaml: unmarshal errors:
  line 21: cannot unmarshal !!map into []string

How can we reproduce this?

See above

goreleaser version

1.1.0-pro

GoReleaser Check

  • goreleaser check shows no errors

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

@aeneasr aeneasr added the bug Something isn't working label Dec 14, 2021
@caarlos0
Copy link
Member

caarlos0 commented Dec 15, 2021

oh, bad documentation, env should be an array:

after:
  hooks:
  - cmd: "bash <(curl -s https://raw.githubusercontent.com/ory/xgoreleaser/master/docs.sh)"
    env:
    - "TAG_VERSION={{ .Tag }}"
    - "DOCS_VERSION={{ .Major }}.{{ .Minor }}"

this should work :)

@caarlos0
Copy link
Member

yeah, will update docs!

aeneasr added a commit to ory/kratos that referenced this issue Dec 15, 2021
@aeneasr
Copy link
Contributor Author

aeneasr commented Dec 15, 2021

Awesome, thank you for the quick help as always @caarlos0 :)

peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this issue Jun 30, 2023
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