-
-
Notifications
You must be signed in to change notification settings - Fork 114
Make go build
work as intended
#264
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
Conversation
The aim of this commit is to make it so that go get github.com/arduino/arduino-builder will build a binary named `arduino-builder` and put it into `$GOPATH/bin` so it will be instantly available (provided the user have `$GOPATH/bin` in their `$PATH`). This is as easy as 1. move all go files to /builder subdir 2. move the main.go to a top dir 3. fix the path to builder in main.go and tests 4. simplify/fix README.md and .travis.yml [v2: fix tests] [v3: fix README and travis.yml accordingly] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
You can already do the same with two
as explained in the readme: https://github.com/arduino/arduino-builder#building-from-source |
I followed these instructions before attempting this PR. The problems are:
|
@cmaglie in other words, the motivation for this PR is make it so that a single command is enoughto start using arduino-builder right away. Meaning, one can do this:
Currently, it's at least three (which is inconvenient and unexpected):
|
IIUC, the problem with the current package is that In any case, the changes proposed in this PR seem good to me, I've always thought this "duplicate" Another thought: Instead of moving all the .go files from the root into a |
In fact it works as intended! Not sure why I missed it when preparing this PR. I'll close this one and prepare another -- for the sake of clarity.
Unfortunately not -- go does not allow one to mix two packages in the same dir:
Yet another workaround would be to move the cli utility (i.e. main.go) to a separate package. Say, rename this repo from |
The aim of this commit is to make it so that
will build a binary named
arduino-builder
and put it into$GOPATH/bin
so it will be instantly available (providedthe user have
$GOPATH/bin
in their$PATH
).This is as easy as
[v2: fix tests]
[v3: fix README and travis.yml]