Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

attfarhan
Copy link
Contributor

@codecov-io
Copy link

codecov-io commented Jan 22, 2019

Codecov Report

Merging #1990 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted Files Coverage Δ
pkg/search/backend/backend.go 93.22% <0%> (-1.7%) ⬇️
shared/src/api/client/services/registry.ts 100% <0%> (ø) ⬆️

@@ -0,0 +1,18 @@
// Ensure that users are running Go 1.11 or newer

// Package minversion prints a boolean stating whether users are running the minimum required Go version.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Package minversion prints a boolean stating whether users are running the minimum required Go version.
// Command minversion prints a boolean stating whether users are running the minimum required Go version.

dev/launch.sh Outdated

if [ "$goversion" == "$min" ] && [ "$goversion" != "$minimumgo" ] ; then
echo "Go version $minimumgo is required; found $goversion"
goversion_above_111=$(go run ./pkg/version/minversion)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this variable should reference the actual version being enforced (as that is contained within the minversion binary).

func main() {
rawVersion := runtime.Version()
versionNumber := strings.TrimPrefix(rawVersion, "go")
fmt.Println(version.Compare("1.11.0", versionNumber, "<="))
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be easier and more natural to rely on exit codes instead

os.Exit(1) // minimum version not met means non-zero exit code

@@ -0,0 +1,18 @@
// Ensure that users are running Go 1.11 or newer
Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove this comment and just leave the package comment.

@attfarhan
Copy link
Contributor Author

@nicksnyder based on your comments I just moved everything (including exit + error message) into the minversion command, and run it in the launch script.

Copy link
Contributor

@nicksnyder nicksnyder left a comment

Choose a reason for hiding this comment

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

I assume that you tested to make sure that launch.sh terminates if minversion exits with a non-zero exit code

@@ -0,0 +1,22 @@
// Command minversion prints a boolean stating whether users are running the minimum required Go version.
Copy link
Contributor

Choose a reason for hiding this comment

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

update comment

@attfarhan attfarhan merged commit 02d70be into master Jan 23, 2019
@attfarhan attfarhan deleted the fa/yarn-on-launch branch January 23, 2019 00:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants