Skip to content

ci: add VERSIONSTRING Makefile overwrite parameter #125

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

Merged
merged 1 commit into from
Dec 20, 2022
Merged

ci: add VERSIONSTRING Makefile overwrite parameter #125

merged 1 commit into from
Dec 20, 2022

Conversation

shawnfunke
Copy link
Contributor

@shawnfunke shawnfunke commented Dec 20, 2022

The VERSIONSTRING parameter for the Makefile is required to be able
to skip the build step that runs git describe --always --dirty and
set the version suffix manually.

This change allows the packaging for Homebrew as during the build
process it cannot execute git commands.

This is a optional parameter and will fall back to the git command if
not set specifically.

make VERSIONSTRING=test DEST=buildir publishTo

Example usage of the parameter, would output a binary with the
version set to 1.0.0-test.

The `VERSIONSTRING` parameter for the Makefile is required to be able
to skip the build step that runs `git describe --always --dirty` and
set the version suffix manually.

This change allows the packaging for Homebrew as during the build
process it cannot execute git commands.
@artempyanykh
Copy link
Owner

Cool, thanks @shawnfunke! Do you plan to make a Homebrew formula for Marksman?

This change allows the packaging for Homebrew as during the build process it cannot execute git commands.

Quick question about this. What would the version string be like when building with Homebrew? Is it going to be hardcoded in the formula?

@shawnfunke
Copy link
Contributor Author

shawnfunke commented Dec 20, 2022

@artempyanykh, yeah, it's supposed to be for homebrew/core (hopefully).

The version of the source code is based on the tag, for example:

  url "https://github.com/artempyanykh/marksman/archive/refs/tags/2022-12-19.tar.gz"
  sha256 "0627b47fa567d8f7655e71282f34807cefb4116c6d48f145683a29488f75cddf"

The version for the binary will probably contain the SHA, so for example
in the end it'd be like 1.0.0-<sha>, might not to be abbreviated but I don't
see that as a problem.

@artempyanykh
Copy link
Owner

Great! Thanks for the contribution @shawnfunke!

@artempyanykh artempyanykh merged commit 108261d into artempyanykh:main Dec 20, 2022
@shawnfunke shawnfunke deleted the user/shawnfunke/version-suffix-overwrite branch December 20, 2022 11:24
@shawnfunke
Copy link
Contributor Author

Thanks for the fast merge! @artempyanykh would you mind to create a
new release so I can reference it in the formula, everything works
as expected.

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