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

update build scripts and/or goreleaser #326

Closed
jchappelow opened this issue Sep 28, 2023 · 2 comments
Closed

update build scripts and/or goreleaser #326

jchappelow opened this issue Sep 28, 2023 · 2 comments
Assignees

Comments

@jchappelow
Copy link
Member

The script in scripts/build/binary sets ldflags to set various version/build info in internal/pkg/build, but this is only used by kwil-cli. The script should also set the values for internal/pkg/version, which is what is used by both kwild and kwil-admin. I don't believe kwild ever reported any version before that update.

Also, the GIT_VERSION shell variable established in scripts/build/binary/.git_variables is mostly obsolete since the VCS info is accessible directly to a go app as done in the new internal/pkg/version. The only point here is the version string, which is possibly a point of contention. I am making a case for setting the semver string ourselves rather than having git report it based on the previous tag, which may not reflect what we want or even be proper semver.

Regarding generation of the binaries we intend to distribute in our new releases/binaries repo, I believe that this should be done ourselves, where we should sign the archives with our PGP key and include the detached signature with the archives. With the release.yaml CI workflow currently disabled, I think we are currently doing the docker pushes manually too.

A related topic is that the old goreleaser file only builds kwil-cli. I know we are using the build scripts mentioned above from our task:build commands instead of this, but the goreleaser build command's functionality (not goreleaser release which also publishes/uploads/etc.) appears to be a sensible tool for generating binaries for multiple platforms and architectures in one go. (cross compiling is a breeze for the Go compiler, at least as long as are not using CGO). I'll see if helps with the multi-arch cross compile, although in the past I have used a small builder app written in Go. If goreleaser works, then it's by far the path of least resistance for us.

@jchappelow jchappelow self-assigned this Sep 28, 2023
@Yaiba
Copy link
Contributor

Yaiba commented Sep 28, 2023

If you have an overall plan then feel free to make changes, the way we handle version and build info is not well planned(most of the code from scripts/build is just simply copied and modified).

@brennanjl
Copy link
Collaborator

brennanjl commented Sep 28, 2023

Second-ing what Gavin said. Our system has been extremely rudimentary up to this point. I'm very open to virtually any change you propose.

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

No branches or pull requests

3 participants