Skip to content

feat: build .deb and .rpm release files#1311

Open
phm07 wants to merge 1 commit intomainfrom
build-linux-packages
Open

feat: build .deb and .rpm release files#1311
phm07 wants to merge 1 commit intomainfrom
build-linux-packages

Conversation

@phm07
Copy link
Contributor

@phm07 phm07 commented Jan 15, 2026

This PR adds the following package files to releases:

  • hcloud-cli-1.59.0-1.aarch64.rpm
  • hcloud-cli-1.59.0-1.x86_64.rpm
  • hcloud-cli_1.59.0_amd64.deb
  • hcloud-cli_1.59.0_arm64.deb

@phm07 phm07 self-assigned this Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.43%. Comparing base (7756f5d) to head (d4b548c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1311   +/-   ##
=======================================
  Coverage   72.43%   72.43%           
=======================================
  Files         301      301           
  Lines       11005    11005           
=======================================
  Hits         7972     7972           
  Misses       2144     2144           
  Partials      889      889           
Flag Coverage Δ
e2e 51.50% <ø> (+<0.01%) ⬆️
unit 67.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@phm07
Copy link
Contributor Author

phm07 commented Jan 16, 2026

Some considerations:

  • Right now goreleaser generates a lot of package files, because it generates one for each architecture. We might want to limit those, amd64 and arm64 would probably be enough. (We still offer direct binary downloads for all architectures anyway)
  • Packages are not signed yet. This causes a problem on alpine for example: ERROR: hcloud-cli_1.59.0_x86_64.apk: UNTRUSTED signature. We'd need to create a key and provide it to users so they can install it

@phm07 phm07 marked this pull request as ready for review January 22, 2026 09:14
@phm07 phm07 requested a review from a team as a code owner January 22, 2026 09:14
@phm07 phm07 force-pushed the build-linux-packages branch from 5f9b15c to be4a77e Compare January 22, 2026 13:07
@phm07 phm07 changed the title feat: build .deb, .rpm and .apk release files feat: build .deb and .rpm release files Jan 22, 2026
@phm07
Copy link
Contributor Author

phm07 commented Jan 23, 2026

The manpage output (as well as the generated markdown docs) would have a way better table view if the tables are printed using markdown format. Our table renderer already supports this, we just need to find a way to switch between the pretty print and markdown. I used a custom config option for now but it doesn't seem to work, because viper is not loaded if you only generate docs/manpages. I'll have a look at this another time.

Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

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

There is still something weird going on with the option table, the rows and columns are not consistent, see no-experimental-warnings and poll-interval

Image

"log"
"os"
// We import md2man here so we can keep it up to date in go.mod
_ "github.com/cpuguy83/go-md2man/v2/md2man"
Copy link
Member

Choose a reason for hiding this comment

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

We can already manually bump the version, even if the dependency is marked as indirect

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But renovate will only pick up direct dependencies, right? Also it would be nice to have it documented so that it doesn't randomly break in the future and nobody knows/notices.

"github.com/hetznercloud/cli/internal/version"
)

const directory = "./manpages"
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about running this and completions.sh as part of go generate and dump the generated files in dist/{manpages,completions}?

Related to the above, is there a reason to put these two files and internal/scripts/generate_docs.go in separate places? They feel pretty related.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it could use some clean up, I'll do that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Two things:

  • Goreleaser requires dist/ to be empty, even after the before hooks. So we probably can't (easily) put our generated files there
  • Why do we want to go generate the manpages and completions? We don't want to commit them into the repository and they are only needed for a release anyway. Only generating manpages and completions is pretty fast, but running a full go generate before each release would be slow.

@phm07 phm07 force-pushed the build-linux-packages branch from b47f89d to 305377e Compare February 6, 2026 09:43
@phm07 phm07 force-pushed the build-linux-packages branch from 305377e to d4b548c Compare February 6, 2026 09:45
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.

2 participants