Fix missing version number while building step-ca from source archive #2513
+5
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The .version.sh file fails at line 4 with the following error:
./.version.sh: 4: Bad substitution ' out of the ' make build GOFLAGS=""The above error results in 'step-ca --version' not including the version number after the build:
Smallstep CA/ (linux/arm64)
Release Date: 2026-01-02 16:32 UTC
Modern *nix-like operating systems symlink the
shshell to bash/dash/etc.Because of this, the output of
.version.shis not consistent across different operating systems.The goal of this change is to make the code POSIX-neutral so that it executes correctly in bash/dash/sh shells.
Tested on Ubuntu 24.04 (amd64), Debian 13 (arm64), and MacOS 15.7.1 (arm).
Fixes #2013
Name of feature:
N/A
Pain or issue this feature alleviates:
This should significantly reduce comments about a missing version number from the output of
step-ca --version.It also removes the error/warning (./.version.sh: 4: Bad substitution ' out of the ' make build GOFLAGS="") while building from source.
Why is this important to the project (if not answered above):
Is there documentation on how to use this feature? If so, where?
In what environments or workflows is this feature supported?
Please let me know what to put here.
In what environments or workflows is this feature explicitly NOT supported (if any)?
Supporting links/other PRs/issues:
Issue #2013
💔Thank you!