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

Add nightly releases #200

Merged
merged 6 commits into from
Feb 19, 2024
Merged

Add nightly releases #200

merged 6 commits into from
Feb 19, 2024

Conversation

ferranbt
Copy link
Collaborator

📝 Summary

This PR enables nightly releases for suave-geth.

📚 References


  • I have seen and agree to CONTRIBUTING.md

@@ -96,8 +96,8 @@ dockers:
- --platform=linux/amd64
image_templates:
- "flashbots/suave-geth:{{ .ShortCommit }}-amd64"
- "flashbots/suave-geth:{{ .Tag }}-amd64"
- "flashbots/suave-geth:latest-amd64"
- "flashbots/suave-geth:v{{ .Version }}-amd64"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was using Tag before, but it needs to use Version because that is the field that the nightly section overrides during nightly releases.

.goreleaser.yaml Outdated
@@ -123,6 +123,12 @@ docker_manifests:
- "flashbots/suave-geth:latest-amd64"
Copy link
Collaborator Author

@ferranbt ferranbt Feb 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure If I have to do something with this @0x416e746f6e

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think this whole block should look like:

  {{- if not .IsNightly }}
  - name_template: "flashbots/suave-geth:latest"
    image_templates:
       - "flashbots/suave-geth:latest-amd64"
       - "flashbots/suave-geth:latest-arm64"
  {{ else }}
  - name_template: "flashbots/suave-geth:latest-nightly"
    image_templates:
       - "flashbots/suave-geth:latest-nightly-amd64"
       - "flashbots/suave-geth:latest-nightly-arm64"
  {{- end }}

@@ -96,8 +96,8 @@ dockers:
- --platform=linux/amd64
image_templates:
- "flashbots/suave-geth:{{ .ShortCommit }}-amd64"
- "flashbots/suave-geth:{{ .Tag }}-amd64"
- "flashbots/suave-geth:latest-amd64"
- "flashbots/suave-geth:v{{ .Version }}-amd64"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also tag it :latest-nightly?

.goreleaser.yaml Outdated
- "flashbots/suave-geth:{{ .Tag }}-amd64"
- "flashbots/suave-geth:latest-amd64"
- "flashbots/suave-geth:v{{ .Version }}-amd64"
- "{{ if not .IsNightly }}flashbots/suave-geth:latest-amd64{{ end }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

Suggested change
- "{{ if not .IsNightly }}flashbots/suave-geth:latest-amd64{{ end }}"
{{- if not .IsNightly }}
- flashbots/suave-geth:latest-amd64
{{ else }}
- flashbots/suave-geth:latest-nightly-amd64
{{- end }}

.goreleaser.yaml Outdated
- "flashbots/suave-geth:{{ .Tag }}-arm64"
- "flashbots/suave-geth:latest-arm64"
- "flashbots/suave-geth:v{{ .Version }}-arm64"
- "{{ if not .IsNightly }}flashbots/suave-geth:latest-arm64{{ end }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

Suggested change
- "{{ if not .IsNightly }}flashbots/suave-geth:latest-arm64{{ end }}"
{{- if not .IsNightly }}
- flashbots/suave-geth:latest-arm64
{{ else }}
- flashbots/suave-geth:latest-nightly-arm64
{{- end }}

.goreleaser.yaml Outdated
@@ -123,6 +123,12 @@ docker_manifests:
- "flashbots/suave-geth:latest-amd64"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think this whole block should look like:

  {{- if not .IsNightly }}
  - name_template: "flashbots/suave-geth:latest"
    image_templates:
       - "flashbots/suave-geth:latest-amd64"
       - "flashbots/suave-geth:latest-arm64"
  {{ else }}
  - name_template: "flashbots/suave-geth:latest-nightly"
    image_templates:
       - "flashbots/suave-geth:latest-nightly-amd64"
       - "flashbots/suave-geth:latest-nightly-arm64"
  {{- end }}

.goreleaser.yaml Outdated
@@ -123,6 +123,12 @@ docker_manifests:
- "flashbots/suave-geth:latest-amd64"
- "flashbots/suave-geth:latest-arm64"

nightly:
name_template: "{{ incpatch .Version }}-nightly"
tag_name: nightly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doubt:

I am not very familiar with this part of goreleaser, but maybe it should be tag_name: latest-nightly.

.goreleaser.yaml Outdated
- "flashbots/suave-geth:{{ .Tag }}-amd64"
- "flashbots/suave-geth:latest-amd64"
- "flashbots/suave-geth:v{{ .Version }}-amd64"
{{- if not .IsNightly }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove this inversion this for less cognitive load? i.e. instead of {{- if not .IsNightly }} do {{- if .IsNightly }}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢 but I so love double negations 😢

Copy link
Contributor

@metachris metachris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm. minor suggestion on removing the if inversion, but not a blocker

@ferranbt ferranbt merged commit e4dee3f into main Feb 19, 2024
4 checks passed
@ferranbt ferranbt deleted the nightly-releases branch February 19, 2024 17:25
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 this pull request may close these issues.

3 participants