- Notifications
You must be signed in to change notification settings - Fork1k
refactor: Add install script for coder CLI#243
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecovbot commentedFeb 10, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## main #243 +/- ##==========================================- Coverage 67.31% 67.02% -0.30%========================================== Files 120 120 Lines 6484 6484 Branches 67 67 ==========================================- Hits 4365 4346 -19- Misses 1701 1717 +16- Partials 418 421 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should we make this a Makefile target instead?
It could run ourmake build
, then even copy all binaries in./bin
to$(go env GOPATH)/bin
.
I'm concerned about users thinkinginstall.sh
would install all of Coder, not just the CLI.
install.sh Outdated
go install cmd/coder/main.go | ||
echo "Coder CLI now installed at:" | ||
echo "$(which coder)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We can make this more accurate with:
echo "$(go env GOPATH)/bin/coder"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
could even do both, install to that location, check if they are different, and if so, emit a warning indicating that something else in PATH is shadowing the one we just installed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
also, unsure whether it matters for this particular script, but if you run it on Windows, then it might not work correctly due to the .exe extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
bryphe-coder commentedFeb 10, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Sure! I think the canonical way for Still kind of sounds like it would install everything - but since we're copying all the binaries ( |
I think that'd be good! I'm just used to |
This adds an
install.sh
script at the root which runsgo install cmd/coder/main.go
- makingcoder
available by default in our workspaces (where thego
bin folder is already in thePATH
).I thought this might be helpful for developer who aren't familiar with
go
or the directory structure, in runningcoder
CLI locally. Open to other ideas though!