Closed
Conversation
2 tasks
875e366 to
fde96bc
Compare
Adopt `consul` repo pattern for setting version to simplify management and build scripts.
fde96bc to
766c7c1
Compare
zalimeni
commented
Jun 7, 2024
Comment on lines
-111
to
+108
| local vfile="${1}/version/version.go" | ||
| local vfile="${1:-.}/version/VERSION" |
Member
Author
There was a problem hiding this comment.
Helps when running locally and sourcing scripts
Comment on lines
-143
to
-151
| # try to determine the version if we have build tags | ||
| for tag in "$GOTAGS"; do | ||
| for vfile in $(find "${1}/version" -name "version_*.go" 2>/dev/null | sort); do | ||
| if grep -q "// +build $tag" "${vfile}"; then | ||
| version_main=$(awk '$1 == "Version" && $2 == "=" { gsub(/"/, "", $3); print $3 }' <${vfile}) | ||
| release_main=$(awk '$1 == "VersionPrerelease" && $2 == "=" { gsub(/"/, "", $3); print $3 }' <${vfile}) | ||
| fi | ||
| done | ||
| done |
Member
Author
There was a problem hiding this comment.
This was consul copypasta by Mitchell and never used from what I can see (we don't have any files that match those globs)
Comment on lines
-119
to
-122
| local include_release="$2" | ||
| local use_git_env="$3" | ||
| local omit_version="$4" | ||
|
|
Member
Author
There was a problem hiding this comment.
These were always true, false, and unset, respectively (2 uses of parse_version, both in 40-publish.sh)
| @@ -1,14 +0,0 @@ | |||
| #!/usr/bin/env bash | |||
Member
Author
There was a problem hiding this comment.
This file was never used and is redundant with make version
| fi | ||
|
|
||
| local rel_ver="" | ||
| if is_set "${include_release}"; then |
Member
Author
There was a problem hiding this comment.
Always true, so removed as outer if
Comment on lines
-164
to
-168
| # When no GIT_DESCRIBE env var is present and no release is in the source then we | ||
| # are definitely in dev mode | ||
| if test -z "${git_version}" -a -z "${rel_ver}" && is_set "${use_git_env}"; then | ||
| rel_ver="dev" | ||
| fi |
Member
Author
There was a problem hiding this comment.
use_git_env was always false, so removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adopt
consulrepo pattern for setting version to simplify management and build scripts.Follow-up to #4091
This PR will require manual backporting due to differences in versions and potential diffs in build scripts.
Changes proposed in this PR
consul(c.f. https://github.com/hashicorp/consul/pull/15631/files#diff-d8adf935a14f14d8de19314b10898d8815b13ee62dad994cd994eaefb5d1d8dfR1)How I've tested this PR
How I expect reviewers to test this PR
Checklist